public class DoNothingVisitor extends java.lang.Object implements ParserVisitor, JepComponent
This class will always leave the original expression intact, but may reuse unchanged parts of the expression.
| Modifier and Type | Field and Description |
|---|---|
protected FunctionTable |
ft
Convenience reference to the FunctionTable
|
protected Jep |
jep
Jep instance
|
protected NodeFactory |
nf
Convenience reference to the NodeFactory
|
protected OperatorTableI |
ot
Convenience reference to the OperatorTableI
|
protected VariableTable |
vt
Convenience reference to the VariableTable
|
| Constructor and Description |
|---|
DoNothingVisitor()
Constructor to use with JepComponent mechanism, init method must be called.
|
DoNothingVisitor(Jep j) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
childrenHaveChanged(Node node,
Node[] children)
Tests if the children of a node have changed
|
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.
|
protected Jep jep
protected NodeFactory nf
protected VariableTable vt
protected FunctionTable ft
protected OperatorTableI ot
public DoNothingVisitor()
public DoNothingVisitor(Jep j)
public JepComponent getLightWeightInstance()
JepComponentgetLightWeightInstance in interface JepComponentpublic void init(Jep j)
JepComponentinit in interface JepComponentj - the current Jep instancepublic Node visit(Node node) throws JepException
JepExceptionpublic Node visitNode(Node node, java.lang.Object data) throws JepException
node - Node to visitdata - user specified dataJepExceptionprotected Node[] visitChildren(Node node, java.lang.Object data) throws JepException
node - current node being visiteddata - user specified dataJepExceptionpublic java.lang.Object visit(ASTConstant node, java.lang.Object data) throws JepException
visit in interface ParserVisitorJepExceptionpublic java.lang.Object visit(ASTVarNode node, java.lang.Object data) throws JepException
visit in interface ParserVisitorJepExceptionpublic java.lang.Object visit(ASTFunNode node, java.lang.Object data) throws JepException
visit in interface ParserVisitorJepExceptionpublic java.lang.Object visit(ASTOpNode node, java.lang.Object data) throws JepException
visit in interface ParserVisitorJepExceptionprotected Node copyChildrenIfNeeded(Node node, Node[] children) throws JepException
JepExceptionprotected boolean childrenHaveChanged(Node node, Node[] children)
node - the original nodechildren - the new set of children.public NodeFactory getNodeFactory()
public OperatorTableI getOperatorTable()
public VariableTable getVariableTable()
public FunctionTable getFunctionTable()
Copyright © 2018 Singular Systems http://www.singularsys.com/jep