Package org.fife.ui.rsyntaxtextarea
Interface TokenFactory
-
- All Known Implementing Classes:
DefaultTokenFactory
interface TokenFactory
Interface for a class that generates tokens somehow.- Version:
- 0.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TokenImpl
createToken()
Returns a null token.TokenImpl
createToken(char[] line, int beg, int end, int startOffset, int type)
Returns a token.TokenImpl
createToken(javax.swing.text.Segment line, int beg, int end, int startOffset, int type)
Returns a token.void
resetAllTokens()
Resets the state of this token maker.
-
-
-
Method Detail
-
createToken
TokenImpl createToken()
Returns a null token.- Returns:
- A null token.
-
createToken
TokenImpl createToken(javax.swing.text.Segment line, int beg, int end, int startOffset, int type)
Returns a token.- Parameters:
line
- The segment from which to get the token's text.beg
- The starting offset of the token's text in the segment.end
- The ending offset of the token's text in the segment.startOffset
- The offset in the document of the token.type
- The type of token.- Returns:
- The token.
-
createToken
TokenImpl createToken(char[] line, int beg, int end, int startOffset, int type)
Returns a token.- Parameters:
line
- The char array from which to get the token's text.beg
- The starting offset of the token's text in the char array.end
- The ending offset of the token's text in the char array.startOffset
- The offset in the document of the token.type
- The type of token.- Returns:
- The token.
-
resetAllTokens
void resetAllTokens()
Resets the state of this token maker. This method should be called by theTokenMaker
every time a token list is generated for a new line so the tokens can be reused.
-
-