Top Description Fields Constructors Methods
org.springframework.expression.spel.standard

pack-priv Class Token

extends Object
Class Inheritance
Imports
org.springframework.lang.Nullable

Holder for a kind of token, the associated data, and its position in the input data stream (start/end).
Author
Andy Clement
Since
3.0

Field Summary

Modifier and TypeField and Description
pack-priv final String
pack-priv final int
pack-priv final TokenKind
pack-priv final int

Constructor Summary

AccessConstructor and Description
pack-priv
Token(TokenKind
the kind of token
tokenKind
,
int
the exact start position
startPos
,
int
the index of the last character
endPos
)

Constructor for use when there is no particular data for the token (e.g. TRUE or '+').

pack-priv
Token(TokenKind
the kind of token
tokenKind
,
char[]
the data for the token
tokenData
,
int
the exact start position
startPos
,
int
the index of the last character
endPos
)

Constructor for use when there is data for the token.

Method Summary

Modifier and TypeMethod and Description
public Token
public Token
public Token
public TokenKind
public boolean
public boolean
public String
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

databack to summary
pack-priv final String data
Annotations
@Nullable
endPosback to summary
pack-priv final int endPos
kindback to summary
pack-priv final TokenKind kind
startPosback to summary
pack-priv final int startPos

Constructor Detail

Tokenback to summary
pack-priv Token(TokenKind tokenKind, int startPos, int endPos)

Constructor for use when there is no particular data for the token (e.g. TRUE or '+').

Parameters
tokenKind:TokenKind

the kind of token

startPos:int

the exact start position

endPos:int

the index of the last character

Tokenback to summary
pack-priv Token(TokenKind tokenKind, char[] tokenData, int startPos, int endPos)

Constructor for use when there is data for the token.

Parameters
tokenKind:TokenKind

the kind of token

tokenData:char[]

the data for the token

startPos:int

the exact start position

endPos:int

the index of the last character

Method Detail

asBetweenTokenback to summary
public Token asBetweenToken()
asInstanceOfTokenback to summary
public Token asInstanceOfToken()
asMatchesTokenback to summary
public Token asMatchesToken()
getKindback to summary
public TokenKind getKind()
isIdentifierback to summary
public boolean isIdentifier()
isNumericRelationalOperatorback to summary
public boolean isNumericRelationalOperator()
stringValueback to summary
public String stringValue()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override