public class ASTNode extends 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() |
<T> T |
getNodeMetaData(Object key)
Gets the node meta data.
|
String |
getText() |
Object |
putNodeMetaData(Object key,
Object value)
Sets the node meta data but allows overwriting values.
|
void |
removeNodeMetaData(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(Object key,
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 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(Object key)
key
- - the meta data keypublic void copyNodeMetaData(ASTNode other)
other
- - the other nodepublic void setNodeMetaData(Object key, Object value)
key
- - the meta data keyvalue
- - the meta data valueGroovyBugError
- if key is null or there is already meta
data under that keypublic Object putNodeMetaData(Object key, Object value)
key
- - the meta data keyvalue
- - the meta data valueGroovyBugError
- if key is nullpublic void removeNodeMetaData(Object key)
key
- - the meta data keyGroovyBugError
- if the key is null