public class ExpressionVisitors
extends java.lang.Object
expressions
.Modifier and Type | Class and Description |
---|---|
static class |
ExpressionVisitors.BoundExpressionVisitor<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 . |
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 tree