| java.lang.Object xtc.tree.Node xtc.tree.Token
Token | final public class Token extends Node (Code) | | A token. A token is an immutable tree node containing a source
file symbol.
author: Robert Grimm version: $Revision: 1.7 $ |
Constructor Summary | |
public | Token(String text) Create a new token. |
Token | public Token(String text)(Code) | | Create a new token.
Parameters: text - The text. |
cast | final public static String cast(Object o)(Code) | | Cast the specified object to a string. If the specified object
is a string, this method simply returns the string. Otherwise,
it casts the object to a node, strips all annotations, and then
returns the resulting token's text.
See Also: Token.test(Object) Parameters: o - The object. The corresponding string. throws: ClassCastException - Signals that the object does notdescribe a string. |
hasTraversal | public boolean hasTraversal()(Code) | | |
isToken | public boolean isToken()(Code) | | |
test | final public static boolean test(Object o)(Code) | | Determine whether the specified object represents a string.
Parameters: o - The object. true if the specifed object is a string or apossibly annotated token. |
|
|