java.lang .Object org.eclipse.jdt.internal.compiler.parser .Scanner All known Subclasses: org.eclipse.jdt.internal.compiler.parser .RecoveryScanner , org.eclipse.jdt.internal.codeassist.select .SelectionScanner , org.eclipse.jdt.internal.core.util .CommentRecorderScanner , org.eclipse.jdt.internal.codeassist.complete .CompletionScanner ,Scanner public class Scanner implements TerminalTokens (Code) IMPORTANT NOTE: Internal Scanner implementation. It is mirrored in
org.eclipse.jdt.core.compiler public package where it is API.
The mirror implementation is using the backward compatible ITerminalSymbols constant
definitions (stable with 2.0), whereas the internal implementation uses TerminalTokens
which constant values reflect the latest parser generation state.
Constructor Summary public Scanner () public Scanner (boolean tokenizeComments, boolean tokenizeWhiteSpace, boolean checkNonExternalizedStringLiterals, long sourceLevel, long complianceLevel, char[][] taskTags, char[][] taskPriorities, boolean isTaskCaseSensitive) public Scanner (boolean tokenizeComments, boolean tokenizeWhiteSpace, boolean checkNonExternalizedStringLiterals, long sourceLevel, char[][] taskTags, char[][] taskPriorities, boolean isTaskCaseSensitive)
BracketKinds final public static int BracketKinds (Code)
COMMENT_ARRAYS_SIZE final public static int COMMENT_ARRAYS_SIZE (Code)
CurlyBracket final public static int CurlyBracket (Code)
HIGH_SURROGATE_MAX_VALUE final public static int HIGH_SURROGATE_MAX_VALUE (Code)
HIGH_SURROGATE_MIN_VALUE final public static int HIGH_SURROGATE_MIN_VALUE (Code)
INVALID_CHARACTER_CONSTANT final public static String INVALID_CHARACTER_CONSTANT (Code)
INVALID_CHAR_IN_STRING final public static String INVALID_CHAR_IN_STRING (Code)
INVALID_ESCAPE final public static String INVALID_ESCAPE (Code)
INVALID_HIGH_SURROGATE final public static String INVALID_HIGH_SURROGATE (Code)
INVALID_LOW_SURROGATE final public static String INVALID_LOW_SURROGATE (Code)
INVALID_UNICODE_ESCAPE final public static String INVALID_UNICODE_ESCAPE (Code)
LOW_SURROGATE_MAX_VALUE final public static int LOW_SURROGATE_MAX_VALUE (Code)
LOW_SURROGATE_MIN_VALUE final public static int LOW_SURROGATE_MIN_VALUE (Code)
NULL_SOURCE_STRING final public static String NULL_SOURCE_STRING (Code)
OptimizedLength final public static int OptimizedLength (Code)
RoundBracket final public static int RoundBracket (Code)
SquareBracket final public static int SquareBracket (Code)
TAG_POSTFIX final public static char TAG_POSTFIX (Code)
TAG_POSTFIX_LENGTH final public static int TAG_POSTFIX_LENGTH (Code)
TAG_PREFIX final public static char[] TAG_PREFIX (Code)
TAG_PREFIX_LENGTH final public static int TAG_PREFIX_LENGTH (Code)
TableSizeInternalTableSize final static int TableSizeInternalTableSize (Code)
UNTERMINATED_COMMENT final public static String UNTERMINATED_COMMENT (Code)
UNTERMINATED_STRING final public static String UNTERMINATED_STRING (Code)
charArray_acharArray_bcharArray_ccharArray_dcharArray_echarArray_fcharArray_gcharArray_hcharArray_icharArray_jcharArray_kcharArray_lcharArray_mcharArray_ncharArray_ocharArray_pcharArray_qcharArray_rcharArray_scharArray_tcharArray_ucharArray_vcharArray_wcharArray_xcharArray_ycharArray_z final static char[] charArray_acharArray_bcharArray_ccharArray_dcharArray_echarArray_fcharArray_gcharArray_hcharArray_icharArray_jcharArray_kcharArray_lcharArray_mcharArray_ncharArray_ocharArray_pcharArray_qcharArray_rcharArray_scharArray_tcharArray_ucharArray_vcharArray_wcharArray_xcharArray_ycharArray_z (Code)
charArray_length final public char[][][][] charArray_length (Code)
checkNonExternalizedStringLiterals public boolean checkNonExternalizedStringLiterals(Code)
commentPtr public int commentPtr(Code)
commentStarts public int[] commentStarts(Code)
commentStops public int[] commentStops(Code)
commentTagStarts public int[] commentTagStarts(Code)
complianceLevel public long complianceLevel(Code)
containsAssertKeyword public boolean containsAssertKeyword(Code)
currentCharacter public char currentCharacter(Code)
currentPosition public int currentPosition(Code)
foundTaskCount public int foundTaskCount(Code)
foundTaskMessages public char[][] foundTaskMessages(Code)
foundTaskPositions public int[][] foundTaskPositions(Code)
foundTaskPriorities public char[][] foundTaskPriorities(Code)
foundTaskTags public char[][] foundTaskTags(Code)
initCharArray final static char[] initCharArray (Code)
initialPositioneofPosition public int initialPositioneofPosition(Code)
insideRecovery public boolean insideRecovery(Code)
isTaskCaseSensitive public boolean isTaskCaseSensitive(Code)
lastCommentLinePosition protected int lastCommentLinePosition(Code)
lineEnds public int[] lineEnds(Code)
linePtr public int linePtr(Code)
newEntry2newEntry3newEntry4newEntry5newEntry6 int newEntry2newEntry3newEntry4newEntry5newEntry6 (Code)
nlsTagsPtr protected int nlsTagsPtr(Code)
recordLineSeparator public boolean recordLineSeparator(Code)
returnOnlyGreater public boolean returnOnlyGreater(Code)
scanningFloatLiteral public boolean scanningFloatLiteral(Code)
source public char source(Code)
sourceLevel public long sourceLevel(Code)
startPosition public int startPosition(Code)
taskPriorities public char[][] taskPriorities(Code)
taskTags public char[][] taskTags(Code)
tokenizeComments public boolean tokenizeComments(Code)
tokenizeWhiteSpace public boolean tokenizeWhiteSpace(Code)
unicodeAsBackSlash public boolean unicodeAsBackSlash(Code)
useAssertAsAnIndentifier public boolean useAssertAsAnIndentifier(Code)
useEnumAsAnIndentifier public boolean useEnumAsAnIndentifier(Code)
wasAcr public boolean wasAcr(Code)
withoutUnicodeBuffer public char[] withoutUnicodeBuffer(Code)
withoutUnicodePtr public int withoutUnicodePtr(Code)
Scanner public Scanner(boolean tokenizeComments, boolean tokenizeWhiteSpace, boolean checkNonExternalizedStringLiterals, long sourceLevel, long complianceLevel, char[][] taskTags, char[][] taskPriorities, boolean isTaskCaseSensitive)(Code)
Scanner public Scanner(boolean tokenizeComments, boolean tokenizeWhiteSpace, boolean checkNonExternalizedStringLiterals, long sourceLevel, char[][] taskTags, char[][] taskPriorities, boolean isTaskCaseSensitive)(Code)
atEnd final public boolean atEnd() (Code)
getCurrentIdentifierSource public char[] getCurrentIdentifierSource()(Code)
getCurrentStringLiteral final public String getCurrentStringLiteral() (Code)
getCurrentTokenEndPosition public int getCurrentTokenEndPosition()(Code)
getCurrentTokenSource public char[] getCurrentTokenSource()(Code)
getCurrentTokenSourceString public char[] getCurrentTokenSourceString()(Code)
getCurrentTokenStartPosition public int getCurrentTokenStartPosition()(Code)
getCurrentTokenString final public String getCurrentTokenString() (Code)
getLineEnd final public int getLineEnd(int lineNumber) (Code)
getLineEnds final public int[] getLineEnds() (Code)
getLineNumber final public int getLineNumber(int position) (Code) Search the line number corresponding to a specific position
Parameters: position - int int
getLineStart final public int getLineStart(int lineNumber) (Code) Search the source position corresponding to the beginning of a given line number
Line numbers are 1-based, and relative to the scanner initialPosition.
Character positions are 0-based.
e.g. getLineStart(1) --> 0 indicates that the first line starts at character 0.
In case the given line number is inconsistent, answers -1.
Parameters: lineNumber - int int
getNextChar final public int getNextChar() (Code)
getNextChar final public boolean getNextChar(char testedChar) (Code)
getNextChar final public int getNextChar(char testedChar1, char testedChar2) (Code)
getNextCharAsDigit final public boolean getNextCharAsDigit(int radix) (Code)
getNextCharAsJavaIdentifierPart public boolean getNextCharAsJavaIdentifierPart()(Code)
getNextCharAsJavaIdentifierPartWithBoundCheck public boolean getNextCharAsJavaIdentifierPartWithBoundCheck()(Code)
getNextCharWithBoundChecks final public int getNextCharWithBoundChecks() (Code)
getRawTokenSource final public char[] getRawTokenSource() (Code)
getRawTokenSourceEnd final public char[] getRawTokenSourceEnd() (Code)
getSource public char[] getSource()(Code)
jumpOverMethodBody final public void jumpOverMethodBody() (Code)
optimizedCurrentTokenSource1 final char[] optimizedCurrentTokenSource1() (Code)
optimizedCurrentTokenSource2 final char[] optimizedCurrentTokenSource2() (Code)
optimizedCurrentTokenSource3 final char[] optimizedCurrentTokenSource3() (Code)
optimizedCurrentTokenSource4 final char[] optimizedCurrentTokenSource4() (Code)
optimizedCurrentTokenSource5 final char[] optimizedCurrentTokenSource5() (Code)
optimizedCurrentTokenSource6 final char[] optimizedCurrentTokenSource6() (Code)
pushLineSeparator final public void pushLineSeparator() (Code)
pushUnicodeLineSeparator final public void pushUnicodeLineSeparator() (Code)
recordComment public void recordComment(int token)(Code)
resetTo public void resetTo(int begin, int end)(Code) Reposition the scanner on some portion of the original source. The given endPosition is the last valid position.
Beyond this position, the scanner will answer EOF tokens (ITerminalSymbols.TokenNameEOF
).
Parameters: begin - the given start positionParameters: end - the given end position
scanIdentifierOrKeyword public int scanIdentifierOrKeyword()(Code)
scanIdentifierOrKeywordWithBoundCheck public int scanIdentifierOrKeywordWithBoundCheck()(Code)
setSource final public void setSource(char[] sourceString) (Code)
unicodeInitializeBuffer public void unicodeInitializeBuffer(int length)(Code)
unicodeStore public void unicodeStore()(Code)