public class ExpressionVisitors
extends java.lang.Object
expressions
.Modifier and Type | Class and Description |
---|---|
static class |
ExpressionVisitors.BoundExpressionVisitor<R>
Deprecated.
use
ExpressionVisitors.BoundVisitor instead |
static class |
ExpressionVisitors.BoundVisitor<R> |
static class |
ExpressionVisitors.ExpressionVisitor<R> |
Modifier and Type | Method and Description |
---|---|
static <R> R |
visit(Expression expr,
ExpressionVisitors.ExpressionVisitor<R> visitor)
Traverses the given
expression with a visitor . |
static java.lang.Boolean |
visitEvaluator(Expression expr,
ExpressionVisitors.ExpressionVisitor<java.lang.Boolean> visitor)
Traverses the given
expression with a visitor . |
public static <R> R visit(Expression expr, ExpressionVisitors.ExpressionVisitor<R> visitor)
expression
with a visitor
.
The visitor will be called to handle each node in the expression tree in postfix order. Result values produced by child nodes are passed when parent nodes are handled.
R
- the return type produced by the expression visitorexpr
- an expression to traversevisitor
- a visitor that will be called to handle each node in the expression treepublic static java.lang.Boolean visitEvaluator(Expression expr, ExpressionVisitors.ExpressionVisitor<java.lang.Boolean> visitor)
expression
with a visitor
.
The visitor will be called to handle only nodes required for determining result in the expression tree in postfix order. Result values produced by child nodes are passed when parent nodes are handled.
expr
- an expression to traversevisitor
- a visitor that will be called to handle each node in the expression tree