Package io.debezium.text
Interface TokenStream.Tokens
-
- All Known Implementing Classes:
TokenStream.CaseInsensitiveTokenFactory,TokenStream.CaseSensitiveTokenFactory,TokenStream.TokenFactory
- Enclosing class:
- TokenStream
public static interface TokenStream.TokensA factory for Token objects, used by aTokenStream.Tokenizerto create tokens in the correct order.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidaddToken(Position position, int index)Create a single-character token at the supplied index in the character stream.default voidaddToken(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.voidaddToken(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
-
addToken
default void addToken(Position position, int index)
Create a single-character token at the supplied index in the character stream. The token type is set to 0, meaning this is equivalent to callingaddToken(index,index+1)oraddToken(index,index+1,0).- Parameters:
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 stream
-
addToken
default 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. The character at the ending index is not included in the token (as this is standard practice when using 0-based indexes). The token type is set to 0, meaning this is equivalent to callingaddToken(startIndex,endIndex,0).- Parameters:
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 stream
-
addToken
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. The character at the ending index is not included in the token (as this is standard practice when using 0-based indexes).- Parameters:
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
-
-