This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.
| Modifier and Type | Field and Description |
|---|---|
| private final Queue | docComments
Queue of recently seen documentation comments. |
| private Tokens. | prevToken
The previous token, set by nextToken(). |
| private final List | savedTokens
Buffer of saved tokens (used during lookahead) |
| private Tokens. | token
The token, set by nextToken(). |
| private final JavaTokenizer | |
| protected Tokens |
| Access | Constructor and Description |
|---|---|
| protected | Scanner(ScannerFactory
the factory which created this Scanner fac, CharBuffer the input, might be modified
Must be positive and less than or equal to input.length. buf)Create a scanner from the input array. |
| protected | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public int | errPos()
Implements com. Return the position where a lexical error occurred; |
| public void | errPos(int pos)
Implements com. Set the position where a lexical error occurred; |
| public Queue | getDocComments()
Implements com. Returns a queue for the documentation comments encountered in a compilation unit. |
| public Position. | getLineMap()
Implements com. Build a map for translating between line numbers and positions in the input. |
| public void | lintWarning(JCDiagnostic.
Implements com. Report a warning that is subject to possible suppression by |
| public void | |
| public Tokens. | prevToken()
Implements com. Return the last character position of the previous token. |
| public void | setPrevToken(Tokens.
Implements com. Sets the previous token. |
| public Tokens. | split()
Implements com. Splits the current token in two and return the first (split) token. |
| public Tokens. | |
| public Tokens. | token(int lookahead)
Implements com. Return token with given lookahead. |
| docComments | back to summary |
|---|---|
| private final Queue<Tokens. Queue of recently seen documentation comments. It is assumed the queue will typically be small. | |
| prevToken | back to summary |
|---|---|
| private Tokens. The previous token, set by nextToken(). | |
| savedTokens | back to summary |
|---|---|
| private final List<Tokens. Buffer of saved tokens (used during lookahead) | |
| token | back to summary |
|---|---|
| private Tokens. The token, set by nextToken(). | |
| tokenizer | back to summary |
|---|---|
| private final JavaTokenizer tokenizer | |
| tokens | back to summary |
|---|---|
| protected Tokens tokens | |
| Scanner | back to summary |
|---|---|
| protected Scanner(ScannerFactory fac, CharBuffer buf) Create a scanner from the input array. This method might
modify the array. To avoid copying the input array, ensure
that
| |
| Scanner | back to summary |
|---|---|
| protected Scanner(ScannerFactory fac, char[] buf, int inputLength) | |
| Scanner | back to summary |
|---|---|
| protected Scanner(ScannerFactory fac, JavaTokenizer tokenizer) | |
| ensureLookahead | back to summary |
|---|---|
| private void ensureLookahead(int lookahead) | |
| errPos | back to summary |
|---|---|
| public int errPos() Implements com. Doc from com. Return the position where a lexical error occurred; | |
| errPos | back to summary |
|---|---|
| public void errPos(int pos) Implements com. Doc from com. Set the position where a lexical error occurred; | |
| getDocComments | back to summary |
|---|---|
| public Queue Implements com. Doc from com. Returns a queue for the documentation comments encountered in a compilation unit. Comments may be added to this queue by the implementation; clients may remove them from the queue as they are analyzed. Note all comments may also be associated with the following token.
| |
| getLineMap | back to summary |
|---|---|
| public Position. Implements com. Doc from com. Build a map for translating between line numbers and positions in the input. | |
| lintWarning | back to summary |
|---|---|
| public void lintWarning(JCDiagnostic. Implements com. Doc from com. Report a warning that is subject to possible suppression by
| |
| nextToken | back to summary |
|---|---|
| public void nextToken() Implements com. Doc from com. Consume the next token. | |
| prevToken | back to summary |
|---|---|
| public Tokens. Implements com. Doc from com. Return the last character position of the previous token. | |
| setPrevToken | back to summary |
|---|---|
| public void setPrevToken(Tokens. Implements com. Doc from com. Sets the previous token. | |
| split | back to summary |
|---|---|
| public Tokens. Implements com. Doc from com. Splits the current token in two and return the first (split) token. For instance '<<<' is split into two tokens '<' and '<<' respectively, and the latter is returned. | |
| token | back to summary |
|---|---|
| public Tokens. Implements com. Doc from com. Return current token. | |
| token | back to summary |
|---|---|
| public Tokens. Implements com. Doc from com. Return token with given lookahead. | |