|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectxtc.tree.Node
xtc.tree.Annotation
public abstract class Annotation
The superclass of all annotations. An annotation adds information (such as comments) to an abstract syntax tree node; it is usually ignored while processing the AST.
| Constructor Summary | |
|---|---|
Annotation()
Create a new, empty annotation. |
|
Annotation(Node node)
Create a new annotation for the specified node. |
|
| Method Summary | |
|---|---|
Node |
getNode()
Get the annotated node. |
java.lang.String |
getTokenText()
Treat this node as a token and get its text. |
Annotation |
innerMost()
Return the inner-most annotation. |
boolean |
isAnnotation()
Determine whether this node is an annotation. |
void |
setNode(Node node)
Set the annotated node. |
Node |
strip()
Strip any annotations. |
Annotation |
toAnnotation()
Get this node as an annotation. |
| Methods inherited from class xtc.tree.Node |
|---|
add, add, addAll, addAll, addAll, addAll, addAllTo, addNode, contains, get, getBoolean, getBooleanProperty, getGeneric, getList, getLocation, getName, getNode, getProperty, getString, getStringProperty, hasLocation, hasName, hasProperty, hasTraversal, hasVariable, indexOf, isEmpty, isGeneric, isList, isToken, iterator, lastIndexOf, properties, remove, removeProperty, set, setLocation, setLocation, setProperty, size, toList, toString, toToken, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Annotation()
public Annotation(Node node)
node - The node.| Method Detail |
|---|
public java.lang.String getTokenText()
Node
getTokenText in class NodeNode.strip()public boolean isAnnotation()
Node
isAnnotation in class Nodetrue if this node is an annotation.Annotationpublic Annotation toAnnotation()
Node
toAnnotation in class Nodepublic Node getNode()
public void setNode(Node node)
node - The new node.public Node strip()
Node
strip in class NodeAnnotationpublic Annotation innerMost()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||