|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public static interface TokenStream.Tokens
A factory for Token objects, used by a TokenStream.Tokenizer
to create tokens in the correct order.
Method Summary | |
---|---|
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. |
void |
addToken(Position position,
int startIndex,
int endIndex,
int type)
Create a single- or multi-character token with the supplied type and with the characters in the range given by the starting and ending index in the character stream. |
Method Detail |
---|
void addToken(Position position, int index)
addToken(index,index+1)
or addToken(index,index+1,0)
.
position
- 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 streamvoid addToken(Position position, int startIndex, int endIndex)
addToken(startIndex,endIndex,0)
.
position
- 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 streamvoid addToken(Position position, int startIndex, int endIndex, int type)
position
- 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 streamtype
- the type of the token
|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |