Package org.eclipse.jface.text.rules
Class Token
java.lang.Object
org.eclipse.jface.text.rules.Token
- All Implemented Interfaces:
IToken
Standard implementation of
IToken
.
Originally since unknown version, but moved to org.eclipse.text in 3.14- Since:
- 3.14
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetData()
Return a data attached to this token.boolean
isEOF()
Return whether this token represents End Of File.boolean
isOther()
Return whether this token is neither undefined, nor whitespace, nor EOF.boolean
Return whether this token is undefined.boolean
Return whether this token represents a whitespace.void
Re-initializes the data of this token.
-
Field Details
-
UNDEFINED
Standard token: Undefined. -
EOF
Standard token: End Of File. -
WHITESPACE
Standard token: Whitespace. -
OTHER
Deprecated.will be removed
-
-
Constructor Details
-
Token
Creates a new token which represents neither undefined, whitespace, nor EOF. The newly created token has the given data attached to it.- Parameters:
data
- the data attached to the newly created token
-
-
Method Details
-
setData
Re-initializes the data of this token. The token may not represent undefined, whitespace, or EOF.- Parameters:
data
- to be attached to the token- Since:
- 2.0
-
getData
Description copied from interface:IToken
Return a data attached to this token. The semantics of this data kept undefined by this interface. -
isOther
public boolean isOther()Description copied from interface:IToken
Return whether this token is neither undefined, nor whitespace, nor EOF. -
isEOF
public boolean isEOF()Description copied from interface:IToken
Return whether this token represents End Of File. -
isWhitespace
public boolean isWhitespace()Description copied from interface:IToken
Return whether this token represents a whitespace.- Specified by:
isWhitespace
in interfaceIToken
- Returns:
true
if this token represents a whitespace
-
isUndefined
public boolean isUndefined()Description copied from interface:IToken
Return whether this token is undefined.- Specified by:
isUndefined
in interfaceIToken
- Returns:
true
if this token is undefined
-