protected abstract class TokenStream.TokenFactory extends Object implements TokenStream.Tokens
| Modifier and Type | Field and Description |
|---|---|
protected List<TokenStream.Token> |
tokens |
| Modifier | Constructor and Description |
|---|---|
protected |
TokenStream.TokenFactory() |
| Modifier and Type | Method and Description |
|---|---|
void |
addToken(Position position,
int index)
Create a single-character token at the supplied index in the character stream.
|
void |
addToken(Position position,
int startIndex,
int endIndex)
Create a single- or multi-character token with the characters in the range given by the starting and ending index in
the character stream.
|
List<TokenStream.Token> |
getTokens() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddTokenprotected final List<TokenStream.Token> tokens
public void addToken(Position position, int index)
addToken(index,index+1) or addToken(index,index+1,0).addToken in interface TokenStream.Tokensposition - the position (line and column numbers) of this new token; may not be nullindex - the index of the character to appear in the token; must be a valid index in the streamTokenStream.Tokens.addToken(Position, int)public final void addToken(Position position, int startIndex, int endIndex)
addToken(startIndex,endIndex,0) .addToken in interface TokenStream.Tokensposition - the position (line and column numbers) of this new token; may not be nullstartIndex - the index of the first character to appear in the token; must be a valid index in the streamendIndex - the index just past the last character to appear in the token; must be a valid index in the streamTokenStream.Tokens.addToken(Position, int, int)public List<TokenStream.Token> getTokens()
Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.