|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openrdf.query.parser.sparql.ast.SimpleNode
public class SimpleNode
| Field Summary | |
|---|---|
protected List<Node> |
children
|
protected int |
id
|
protected Node |
parent
|
protected SyntaxTreeBuilder |
parser
|
| Constructor Summary | |
|---|---|
SimpleNode(int id)
|
|
SimpleNode(SyntaxTreeBuilder parser,
int id)
|
|
| Method Summary | ||
|---|---|---|
Object |
childrenAccept(SyntaxTreeBuilderVisitor visitor,
Object data)
Accept the visitor. |
|
String |
dump(String prefix)
Writes a tree-like representation of this node and all of its subnodes (recursively) and returns it as a string. |
|
void |
dump(String prefix,
Appendable out)
Writes a tree-like representation of this node and all of its subnodes (recursively) to the supplied Appendable. |
|
Object |
jjtAccept(SyntaxTreeBuilderVisitor visitor,
Object data)
Accept the visitor. |
|
void |
jjtAddChild(Node n,
int i)
This method tells the node to add its argument to the node's list of children. |
|
void |
jjtAppendChild(Node n)
Adds the supplied node as the last child node to this node. |
|
void |
jjtClose()
This method is called after all the child nodes have been added. |
|
|
jjtGetChild(Class<T> type)
Gets the (first) child of this node that is of the specific type. |
|
Node |
jjtGetChild(int i)
This method returns a child node. |
|
List<Node> |
jjtGetChildren()
|
|
|
jjtGetChildren(Class<T> type)
|
|
int |
jjtGetNumChildren()
Return the number of children the node has. |
|
Node |
jjtGetParent()
|
|
void |
jjtInsertChild(Node n,
int i)
Adds the supplied node as the i'th child node to this node. |
|
void |
jjtOpen()
This method is called after the node has been made the current node. |
|
void |
jjtReplaceChild(Node oldNode,
Node newNode)
Replaces a child node with a new node. |
|
void |
jjtReplaceWith(Node newNode)
Replaces this node with the supplied one in the AST. |
|
void |
jjtSetParent(Node n)
This pair of methods are used to inform the node of its parent. |
|
String |
toString()
|
|
String |
toString(String prefix)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Node parent
protected List<Node> children
protected int id
protected SyntaxTreeBuilder parser
| Constructor Detail |
|---|
public SimpleNode(int id)
public SimpleNode(SyntaxTreeBuilder parser,
int id)
| Method Detail |
|---|
public void jjtOpen()
Node
jjtOpen in interface Nodepublic void jjtClose()
Node
jjtClose in interface Nodepublic void jjtSetParent(Node n)
Node
jjtSetParent in interface Nodepublic Node jjtGetParent()
jjtGetParent in interface Node
public void jjtAddChild(Node n,
int i)
Node
jjtAddChild in interface Nodepublic void jjtAppendChild(Node n)
Node
jjtAppendChild in interface Node
public void jjtInsertChild(Node n,
int i)
Node
jjtInsertChild in interface Node
public void jjtReplaceChild(Node oldNode,
Node newNode)
Node
jjtReplaceChild in interface Nodepublic void jjtReplaceWith(Node newNode)
newNode - The replacement node.public List<Node> jjtGetChildren()
public Node jjtGetChild(int i)
Node
jjtGetChild in interface Nodepublic <T extends Node> T jjtGetChild(Class<T> type)
type - The type of the child node that should be returned.
public <T extends Node> List<T> jjtGetChildren(Class<T> type)
public int jjtGetNumChildren()
Node
jjtGetNumChildren in interface Node
public Object jjtAccept(SyntaxTreeBuilderVisitor visitor,
Object data)
throws VisitorException
Node
jjtAccept in interface NodeVisitorException
public Object childrenAccept(SyntaxTreeBuilderVisitor visitor,
Object data)
throws VisitorException
VisitorExceptionpublic String toString()
toString in class Objectpublic String toString(String prefix)
public void dump(String prefix,
Appendable out)
throws IOException
IOExceptionpublic String dump(String prefix)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||