Class AnnotationLexer
java.lang.Object
org.infinispan.protostream.impl.parser.AnnotationLexer
Splits an input array of characters into tokens. See
AnnotationTokens.- Since:
- 2.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate charThe current input char.private intprivate final booleanDo we expect to encounter non-syntactically correct text which is probably human readable documentation surrounding the annotations?(package private) StringThe actual identifier, if last recognized token isAnnotationTokens.IDENTIFIER, ornullotherwise.private final char[]The input buffer.private int(package private) longprivate booleanIndicates if all scanned characters on current line up to current char are whitespace.private int(package private) longprivate final StringBuilder(package private) AnnotationTokensLast recognized token. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetText(int startIndex, int endIndex) voidprivate voidprivate voidprivate voidprivate voidprivate voidprivate voidvoidSkip characters until we stumble on an annotation.
-
Field Details
-
token
AnnotationTokens tokenLast recognized token. -
pos
long pos -
lastPos
long lastPos -
identifier
String identifierThe actual identifier, if last recognized token isAnnotationTokens.IDENTIFIER, ornullotherwise. -
sb
-
input
private final char[] inputThe input buffer. -
inputPos
private int inputPos -
ch
private char chThe current input char. -
line
private int line -
col
private int col -
leadingWhitespace
private boolean leadingWhitespaceIndicates if all scanned characters on current line up to current char are whitespace. -
expectDocNoise
private final boolean expectDocNoiseDo 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
-
nextToken
public void nextToken()
-