|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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 OperatorTableI |
ot
|
protected VariableTable |
vt
|
Constructor Summary | |
---|---|
DoNothingVisitor()
|
|
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. |
FunctionTable |
getFunctionTable()
|
JepComponent |
getLightWeightInstance()
Gets a light-weight instance suitable for using in multiple threads. |
NodeFactory |
getNodeFactory()
|
OperatorTableI |
getOperatorTable()
|
VariableTable |
getVariableTable()
|
void |
init(Jep j)
Initialize the component. |
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 OperatorTableI ot
Constructor Detail |
---|
public DoNothingVisitor()
public DoNothingVisitor(Jep j)
Method Detail |
---|
public JepComponent getLightWeightInstance()
JepComponent
getLightWeightInstance
in interface JepComponent
public void init(Jep j)
JepComponent
init
in interface JepComponent
j
- the current Jep instancepublic 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
public NodeFactory getNodeFactory()
public OperatorTableI getOperatorTable()
public VariableTable getVariableTable()
public FunctionTable getFunctionTable()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |