public class NodeImpl extends JDOQLAST implements Node
Declaration
, Expression
and OrderingExpression. This class is not defined
abstract
to allow the syntactical analysis to
construct general nodes, which are replaced by the semantic analysis
with their specialized counterparts.
Constructor and Description |
---|
NodeImpl()
The noarg constructor is needed for ANTLR support and deserialization.
|
NodeImpl(antlr.Token token)
The noarg constructor is needed for ANTLR support.
|
Modifier and Type | Method and Description |
---|---|
void |
arrive(NodeVisitor visitor)
Implements a noop as a default implementation.
|
protected java.lang.Object |
clone()
Creates and returns a copy of this object nullifying fields
parent , children and clazz . |
Node[] |
getChildren()
Returns this node's children.
|
java.lang.Class |
getJavaClass()
Returns the Java type of this node.
|
java.lang.Object |
getObject()
Returns the user object.
|
Node |
getParent()
Returns this node's parent node.
|
int |
getTokenType()
Returns the token type of this node.
|
java.lang.Object |
leave(NodeVisitor visitor,
java.lang.Object[] results)
Returns
null as a default implementation. |
void |
setObject(java.lang.Object object)
Sets the user object.
|
void |
setParent(Node parent)
Sets the parent of this node.
|
java.lang.String |
toString()
Returns a string representation of this JDOQLAST.
|
boolean |
walkNextChild(NodeVisitor visitor,
java.lang.Object resultOfPreviousChild,
int indexOfNextChild)
Returns
true as a default implementation. |
getColumn, getLine, getTypeInfo, initialize, initialize, initialize, setColumn, setLine, setTypeInfo, treeToString
addChild, decode, encode, equals, equalsList, equalsListPartial, equalsTree, equalsTreePartial, findAll, findAllPartial, getFirstChild, getNextSibling, getNumberOfChildren, getTokenNames, removeChildren, setFirstChild, setNextSibling, setVerboseStringConversion, toStringList, toStringTree, xmlSerialize, xmlSerializeNode, xmlSerializeRootClose, xmlSerializeRootOpen
public NodeImpl()
setChildren
optionally.public NodeImpl(antlr.Token token)
setChildren
optionally.protected java.lang.Object clone() throws java.lang.CloneNotSupportedException
parent
, children
and clazz
.public java.lang.String toString()
JDOQLAST
public java.lang.Class getJavaClass()
getJavaClass
in interface Node
public int getTokenType()
getTokenType
in interface Node
public java.lang.Object getObject()
public void setObject(java.lang.Object object)
public Node getParent()
public void setParent(Node parent)
public Node[] getChildren()
getChildren
in interface Node
public void arrive(NodeVisitor visitor)
public java.lang.Object leave(NodeVisitor visitor, java.lang.Object[] results)
null
as a default implementation.public boolean walkNextChild(NodeVisitor visitor, java.lang.Object resultOfPreviousChild, int indexOfNextChild)
true
as a default implementation.walkNextChild
in interface Node
visitor
- the node visitorresultOfPreviousChild
- the result computed by leaving the
previous child nodeindexOfNextChild
- the index in the children array of the
next child to walktrue
Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.