Package org.eclipse.jface.text.rules
Class Token
- java.lang.Object
-
- org.eclipse.jface.text.rules.Token
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectgetData()Return a data attached to this token.booleanisEOF()Return whether this token represents End Of File.booleanisOther()Return whether this token is neither undefined, nor whitespace, nor EOF.booleanisUndefined()Return whether this token is undefined.booleanisWhitespace()Return whether this token represents a whitespace.voidsetData(Object data)Re-initializes the data of this token.
-
-
-
Field Detail
-
UNDEFINED
public static final IToken UNDEFINED
Standard token: Undefined.
-
EOF
public static final IToken EOF
Standard token: End Of File.
-
WHITESPACE
public static final IToken WHITESPACE
Standard token: Whitespace.
-
OTHER
@Deprecated public static final IToken OTHER
Deprecated.will be removed
-
-
Constructor Detail
-
Token
public Token(Object data)
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 Detail
-
setData
public void setData(Object data)
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
public Object getData()
Description copied from interface:ITokenReturn a data attached to this token. The semantics of this data kept undefined by this interface.
-
isOther
public boolean isOther()
Description copied from interface:ITokenReturn whether this token is neither undefined, nor whitespace, nor EOF.
-
isEOF
public boolean isEOF()
Description copied from interface:ITokenReturn whether this token represents End Of File.
-
isWhitespace
public boolean isWhitespace()
Description copied from interface:ITokenReturn whether this token represents a whitespace.- Specified by:
isWhitespacein interfaceIToken- Returns:
trueif this token represents a whitespace
-
isUndefined
public boolean isUndefined()
Description copied from interface:ITokenReturn whether this token is undefined.- Specified by:
isUndefinedin interfaceIToken- Returns:
trueif this token is undefined
-
-