public final class ExprTreeWalker
extends java.lang.Object
NOTE: Actions taken in the traversal process depend on the current status of the visitor (see
ExprTreeVisitor.Status
). There are three possible statuses:
The status is checked after calling any visitor method. Once ABORT is set, all traversal methods return. If after a call to a method having the Begin suffix (e.g. onExprBegin), the SKIP status is set (not ABORT and not OR), nested elements of the visited node (child nodes or subtrees) are not traversed and a corresponding terminating method (that has the End suffix) is called.
Constructor and Description |
---|
ExprTreeWalker(ExprTreeVisitor visitor)
Constructs an ExprTreeWalker object.
|
public ExprTreeWalker(ExprTreeVisitor visitor)
visitor
- Visitor to be applied to tree nodes.java.lang.NullPointerException
- if the visitor parameter is null.public void visit(java.lang.Iterable<? extends Node> trees)
trees
- A sequence of expression trees to be visited.java.lang.NullPointerException
- if the parameter equals null. IllegalArgumentException if any of
the child nodes of the expression nodes in the sequence has a unknown type.public void visit(Node tree)
tree
- Expression tree to be visited.java.lang.NullPointerException
- if the parameter equals null.java.lang.IllegalArgumentException
- if any of the expression tree nodes has a unknown type.public void visitNode(Node node)
node
- Node to be visited.java.lang.NullPointerException
- if the parameter equals null.java.lang.IllegalArgumentException
- if the node or any of its child nodes has a unknown type.