Class AnnotationLexer

java.lang.Object
org.infinispan.protostream.impl.parser.AnnotationLexer

final class AnnotationLexer extends Object
Splits an input array of characters into tokens. See AnnotationTokens.
Since:
2.0
  • Field Details

    • token

      Last recognized token.
    • pos

      long pos
    • lastPos

      long lastPos
    • identifier

      String identifier
      The actual identifier, if last recognized token is AnnotationTokens.IDENTIFIER, or null otherwise.
    • sb

      private final StringBuilder sb
    • input

      private final char[] input
      The input buffer.
    • inputPos

      private int inputPos
    • ch

      private char ch
      The current input char.
    • line

      private int line
    • col

      private int col
    • leadingWhitespace

      private boolean leadingWhitespace
      Indicates if all scanned characters on current line up to current char are whitespace.
    • expectDocNoise

      private final boolean expectDocNoise
      Do we expect to encounter non-syntactically correct text which is probably human readable documentation surrounding the annotations?
  • Constructor Details

    • AnnotationLexer

      AnnotationLexer(char[] input, boolean expectDocNoise)
  • Method Details

    • skipDocNoise

      public void skipDocNoise()
      Skip characters until we stumble on an annotation.
    • scanNextChar

      private void scanNextChar()
    • scanLiteralChar

      private void scanLiteralChar()
    • scanDecimal

      private void scanDecimal()
    • scanNumber

      private void scanNumber()
    • scanUnicode

      private void scanUnicode()
    • scanIdentifier

      private void scanIdentifier()
    • getBufferPos

      public int getBufferPos()
    • getText

      public String getText(int startIndex, int endIndex)
    • nextToken

      public void nextToken()