public class SimpleNode extends Object implements Node
Modifier and Type | Field and Description |
---|---|
protected Node[] |
children |
protected int |
id |
protected Node |
parent |
protected JSONPathCompiler |
parser |
protected Object |
value |
Constructor and Description |
---|
SimpleNode(int i) |
SimpleNode(JSONPathCompiler p,
int i) |
Modifier and Type | Method and Description |
---|---|
void |
dump(String prefix) |
int |
getId() |
void |
jjtAddChild(Node n,
int i)
This method tells the node to add its argument to the node's
list of children.
|
void |
jjtClose()
This method is called after all the child nodes have been
added.
|
static Node |
jjtCreate(int id) |
static Node |
jjtCreate(JSONPathCompiler p,
int id) |
Node |
jjtGetChild(int i)
This method returns a child node.
|
int |
jjtGetNumChildren()
Return the number of children the node has.
|
Node |
jjtGetParent() |
Object |
jjtGetValue() |
void |
jjtOpen()
This method is called after the node has been made the current
node.
|
void |
jjtSetParent(Node n)
This pair of methods are used to inform the node of its
parent.
|
void |
jjtSetValue(Object value) |
String |
toString()
Returns a string representation of the object.
|
String |
toString(String prefix) |
protected Node[] children
protected int id
protected Node parent
protected JSONPathCompiler parser
protected Object value
public SimpleNode(int i)
public SimpleNode(JSONPathCompiler p, int i)
public void dump(String prefix)
public void jjtAddChild(Node n, int i)
Node
jjtAddChild
in interface Node
public void jjtClose()
Node
public static Node jjtCreate(int id)
public static Node jjtCreate(JSONPathCompiler p, int id)
public Node jjtGetChild(int i)
Node
jjtGetChild
in interface Node
public int jjtGetNumChildren()
Node
jjtGetNumChildren
in interface Node
public Node jjtGetParent()
jjtGetParent
in interface Node
public Object jjtGetValue()
public void jjtOpen()
Node
public void jjtSetParent(Node n)
Node
jjtSetParent
in interface Node
public void jjtSetValue(Object value)
public String toString()
Object
toString
method returns a
string that "textually represents" this object. The result should be a concise but informative
representation that is easy for a person to read. It is recommended that all subclasses override
this method.
The toString
method for class Object
returns a string consisting of the name of
the class of which the object is an instance, the at-sign character `@
', and the unsigned
hexadecimal representation of the hash code of the object. In other words, this method returns a
string equal to the value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())