public class ASTNode extends Object
Base class for any AST node. This class supports basic information used in all nodes of the AST:
Type | Name and description |
---|---|
int |
columnNumber |
int |
lastColumnNumber |
int |
lastLineNumber |
int |
lineNumber |
ListHashMap |
metaDataMap |
T |
nodeMetaData |
Object |
nodeMetaData |
Type Params | Return Type | Name and description |
---|---|---|
|
void |
copyNodeMetaData(ASTNode other) Copies all node meta data from the other node to this one |
|
void |
copyNodeMetaData(NodeMetaDataHandler other) |
|
boolean |
equals(Object o) |
|
int |
getColumnNumber() |
|
int |
getLastColumnNumber() |
|
int |
getLastLineNumber() |
|
int |
getLineNumber() |
|
ListHashMap |
getMetaDataMap() |
<T> |
T |
getNodeMetaData(Object key) |
|
Map<?, ?> |
getNodeMetaData() |
|
String |
getText() |
|
int |
hashCode() |
|
Object |
putNodeMetaData(Object key, Object value) |
|
void |
removeNodeMetaData(Object key) |
|
void |
setColumnNumber(int columnNumber) |
|
void |
setLastColumnNumber(int lastColumnNumber) |
|
void |
setLastLineNumber(int lastLineNumber) |
|
void |
setLineNumber(int lineNumber) |
|
void |
setMetaDataMap(Map<?, ?> metaDataMap) |
|
void |
setNodeMetaData(Object key, Object value) |
|
void |
setSourcePosition(ASTNode node) Sets the source position using another ASTNode. |
|
void |
visit(GroovyCodeVisitor visitor) |
Copies all node meta data from the other node to this one
other
- - the other nodeSets the source position using another ASTNode. The sourcePosition consists of a line/column pair for the start and a line/column pair for the end of the expression or statement
node
- - the node used to configure the position information