|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.singularsys.jep.walkers.DoNothingVisitor
public class DoNothingVisitor
A Visitor which visits each node of a expression tree and does nothing. This visitor is intended as a base class for other visitors which manipulate expressions.
This class will always leave the original expression intact, but may reuse unchanged parts of the expression.
Field Summary | |
---|---|
protected FunctionTable |
ft
|
protected Jep |
jep
|
protected NodeFactory |
nf
|
protected OperatorTable |
ot
|
protected VariableTable |
vt
|
Constructor Summary | |
---|---|
DoNothingVisitor(Jep j)
|
Method Summary | |
---|---|
protected Node |
copyChildrenIfNeeded(Node node,
Node[] children)
Sets the children of a node if they have changed for it current children. |
java.lang.Object |
visit(ASTConstant node,
java.lang.Object data)
Visit a constant node. |
java.lang.Object |
visit(ASTFunNode node,
java.lang.Object data)
Visit a function node. |
java.lang.Object |
visit(ASTOpNode node,
java.lang.Object data)
Visit a operator node. |
java.lang.Object |
visit(ASTVarNode node,
java.lang.Object data)
Visit a variable node. |
Node |
visit(Node node)
|
protected Node[] |
visitChildren(Node node,
java.lang.Object data)
Gets the result of visiting children of a array of nodes. |
Node |
visitNode(Node node,
java.lang.Object data)
Used to recursively visit the children of a node. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Jep jep
protected NodeFactory nf
protected VariableTable vt
protected FunctionTable ft
protected OperatorTable ot
Constructor Detail |
---|
public DoNothingVisitor(Jep j)
Method Detail |
---|
public Node visit(Node node) throws JepException
JepException
public Node visitNode(Node node, java.lang.Object data) throws JepException
node
- Node to visitdata
- user specified data
JepException
protected Node[] visitChildren(Node node, java.lang.Object data) throws JepException
node
- current node being visiteddata
- user specified data
JepException
public java.lang.Object visit(ASTConstant node, java.lang.Object data) throws JepException
visit
in interface ParserVisitor
JepException
public java.lang.Object visit(ASTVarNode node, java.lang.Object data) throws JepException
visit
in interface ParserVisitor
JepException
public java.lang.Object visit(ASTFunNode node, java.lang.Object data) throws JepException
visit
in interface ParserVisitor
JepException
public java.lang.Object visit(ASTOpNode node, java.lang.Object data) throws JepException
visit
in interface ParserVisitor
JepException
protected Node copyChildrenIfNeeded(Node node, Node[] children) throws JepException
JepException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |