Package dev.cel.checker
Class ExprVisitor
- java.lang.Object
-
- dev.cel.checker.ExprVisitor
-
- Direct Known Subclasses:
CelProtoExprVisitor
@Internal public abstract class ExprVisitor extends java.lang.Object
CEL expression visitor implementation.CEL Library Internals. Do Not Use.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ExprVisitor.ComprehensionArg
ComprehensionArg specifies the arg ordinal values for comprehension arguments, where the ordinal of the enum maps to the ordinal of the argument in the comprehension expression.
-
Constructor Summary
Constructors Modifier Constructor Description protected
ExprVisitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
visit(Expr expr)
Visit theexpr
value, routing to overloads based on the kind of expression.protected void
visit(Expr expr, Constant constant)
Visit aExpr.Constant
expression.protected void
visit(Expr expr, Expr.Call call)
Visit aExpr.Call
expression.protected void
visit(Expr expr, Expr.Comprehension comprehension)
Visit aExpr.Comprehension
expression.protected void
visit(Expr expr, Expr.CreateList createList)
Visit aExpr.CreateList
expression.protected void
visit(Expr expr, Expr.CreateStruct createStruct)
Visit aExpr.CreateStruct
expression.protected void
visit(Expr expr, Expr.Ident ident)
Visit anExpr.Ident
expression.protected void
visit(Expr expr, Expr.Select select)
Visit aExpr.Select
expression.protected void
visitArg(Expr expr, Expr arg, int argNum)
Visit the argument to an expression in the context of the calling expression.
-
-
-
Method Detail
-
visit
public void visit(Expr expr)
Visit theexpr
value, routing to overloads based on the kind of expression.
-
visit
protected void visit(Expr expr, Expr.Ident ident)
Visit anExpr.Ident
expression.
-
visit
protected void visit(Expr expr, Expr.Select select)
Visit aExpr.Select
expression.
-
visit
protected void visit(Expr expr, Expr.Call call)
Visit aExpr.Call
expression.Arguments to the call are provided to the
visitArg(dev.cel.expr.Expr, dev.cel.expr.Expr, int)
function after they have beenvisit
ed.
-
visit
protected void visit(Expr expr, Expr.CreateStruct createStruct)
Visit aExpr.CreateStruct
expression.
-
visit
protected void visit(Expr expr, Expr.CreateList createList)
Visit aExpr.CreateList
expression.
-
visit
protected void visit(Expr expr, Expr.Comprehension comprehension)
Visit aExpr.Comprehension
expression.Arguments to the comprehension are provided to the
visitArg(dev.cel.expr.Expr, dev.cel.expr.Expr, int)
function after they have beenvisit
ed.
-
visitArg
protected void visitArg(Expr expr, Expr arg, int argNum)
Visit the argument to an expression in the context of the calling expression.For
Expr.Call
expressions, the arg num refers to the ordinal of the argument.For
Expr.Comprehension
expressions, the arg number refers to the ordinal of the enum value as it appears inExprVisitor.ComprehensionArg
.
-
-