|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.singularsys.jep.walkers.DoNothingVisitor com.singularsys.jep.walkers.DeepCopyVisitor
public class DeepCopyVisitor
A Visitor which returns an exact copy of the tree. This class should be extended by visitors which modify trees and creates a new tree.
Field Summary |
---|
Fields inherited from class com.singularsys.jep.walkers.DoNothingVisitor |
---|
ft, jep, nf, ot, vt |
Constructor Summary | |
---|---|
DeepCopyVisitor()
Constructor to use as a JepComponent. |
|
DeepCopyVisitor(Jep j)
Constructor to use in a standalone context. |
Method Summary | |
---|---|
Node |
deepCopy(Node node)
Creates a deepCopy of a Node |
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. |
Methods inherited from class com.singularsys.jep.walkers.DoNothingVisitor |
---|
copyChildrenIfNeeded, getFunctionTable, getLightWeightInstance, getNodeFactory, getOperatorTable, getVariableTable, init, visit, visitChildren, visitNode |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DeepCopyVisitor(Jep j)
j
- Jep instance to use.public DeepCopyVisitor()
DoNothingVisitor.init(Jep)
must be called later.
Method Detail |
---|
public Node deepCopy(Node node) throws JepException
JepException
public java.lang.Object visit(ASTConstant node, java.lang.Object data) throws ParseException
DoNothingVisitor
visit
in interface ParserVisitor
visit
in class DoNothingVisitor
ParseException
public java.lang.Object visit(ASTFunNode node, java.lang.Object data) throws JepException
DoNothingVisitor
visit
in interface ParserVisitor
visit
in class DoNothingVisitor
JepException
public java.lang.Object visit(ASTOpNode node, java.lang.Object data) throws JepException
DoNothingVisitor
visit
in interface ParserVisitor
visit
in class DoNothingVisitor
JepException
public java.lang.Object visit(ASTVarNode node, java.lang.Object data) throws ParseException
DoNothingVisitor
visit
in interface ParserVisitor
visit
in class DoNothingVisitor
ParseException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |