public class ASTNode
extends java.lang.Object
Constructor and Description |
---|
ASTNode() |
Modifier and Type | Method and Description |
---|---|
void |
copyNodeMetaData(ASTNode other)
Copies all node meta data from the other node to this one
|
int |
getColumnNumber() |
int |
getLastColumnNumber() |
int |
getLastLineNumber() |
int |
getLineNumber() |
java.util.Map<?,?> |
getNodeMetaData()
Returns an unmodifiable view of the current node metadata.
|
<T> T |
getNodeMetaData(java.lang.Object key)
Gets the node meta data.
|
java.lang.String |
getText() |
java.lang.Object |
putNodeMetaData(java.lang.Object key,
java.lang.Object value)
Sets the node meta data but allows overwriting values.
|
void |
removeNodeMetaData(java.lang.Object key)
Removes a node meta data entry.
|
void |
setColumnNumber(int columnNumber) |
void |
setLastColumnNumber(int lastColumnNumber) |
void |
setLastLineNumber(int lastLineNumber) |
void |
setLineNumber(int lineNumber) |
void |
setNodeMetaData(java.lang.Object key,
java.lang.Object value)
Sets the node meta data.
|
void |
setSourcePosition(ASTNode node)
Sets the source position using another ASTNode.
|
void |
visit(GroovyCodeVisitor visitor) |
public void visit(GroovyCodeVisitor visitor)
public java.lang.String getText()
public int getLineNumber()
public void setLineNumber(int lineNumber)
public int getColumnNumber()
public void setColumnNumber(int columnNumber)
public int getLastLineNumber()
public void setLastLineNumber(int lastLineNumber)
public int getLastColumnNumber()
public void setLastColumnNumber(int lastColumnNumber)
public void setSourcePosition(ASTNode node)
node
- - the node used to configure the position informationpublic <T> T getNodeMetaData(java.lang.Object key)
key
- - the meta data keypublic void copyNodeMetaData(ASTNode other)
other
- - the other nodepublic void setNodeMetaData(java.lang.Object key, java.lang.Object value)
key
- - the meta data keyvalue
- - the meta data valueGroovyBugError
- if key is null or there is already meta
data under that keypublic java.lang.Object putNodeMetaData(java.lang.Object key, java.lang.Object value)
key
- - the meta data keyvalue
- - the meta data valueGroovyBugError
- if key is nullpublic void removeNodeMetaData(java.lang.Object key)
key
- - the meta data keyGroovyBugError
- if the key is nullpublic java.util.Map<?,?> getNodeMetaData()