Package dev.cel.common.ast
Class CelExprVisitor
- java.lang.Object
-
- dev.cel.common.ast.CelExprVisitor
-
- Direct Known Subclasses:
CelUnparserVisitor
public class CelExprVisitor extends java.lang.Object
CEL expression visitor implementation using Cel native types.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CelExprVisitor.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
CelExprVisitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
visit(CelExpr expr)
Visit theexpr
value, routing to overloads based on the kind of expression.protected void
visit(CelExpr expr, CelConstant constant)
Visit aCelConstant
expression.protected void
visit(CelExpr expr, CelExpr.CelCall call)
Visit aCelCall
expression.protected void
visit(CelExpr expr, CelExpr.CelComprehension comprehension)
Visit aCelComprehension
expression.protected void
visit(CelExpr expr, CelExpr.CelIdent ident)
Visit anCelIdent
expression.protected void
visit(CelExpr expr, CelExpr.CelList list)
Visit aCelList
expression.protected void
visit(CelExpr expr, CelExpr.CelMap map)
Visit aCelMap
expression.protected void
visit(CelExpr expr, CelExpr.CelSelect select)
Visit aCelSelect
expression.protected void
visit(CelExpr expr, CelExpr.CelStruct struct)
Visit aCelStruct
expression.void
visit(CelAbstractSyntaxTree ast)
Visit theast
value, routing to overloads based on the kind of expression.protected void
visitArg(CelExpr expr, CelExpr arg, int argNum)
Visit the argument to an expression in the context of the calling expression.
-
-
-
Method Detail
-
visit
public void visit(CelAbstractSyntaxTree ast)
Visit theast
value, routing to overloads based on the kind of expression.
-
visit
public void visit(CelExpr expr)
Visit theexpr
value, routing to overloads based on the kind of expression.
-
visit
protected void visit(CelExpr expr, CelExpr.CelIdent ident)
Visit anCelIdent
expression.
-
visit
protected void visit(CelExpr expr, CelConstant constant)
Visit aCelConstant
expression.
-
visit
protected void visit(CelExpr expr, CelExpr.CelSelect select)
Visit aCelSelect
expression.
-
visit
protected void visit(CelExpr expr, CelExpr.CelCall call)
Visit aCelCall
expression.Arguments to the call are provided to the
visitArg(dev.cel.common.ast.CelExpr, dev.cel.common.ast.CelExpr, int)
function after they have beenvisit
ed.
-
visit
protected void visit(CelExpr expr, CelExpr.CelStruct struct)
Visit aCelStruct
expression.
-
visit
protected void visit(CelExpr expr, CelExpr.CelMap map)
Visit aCelMap
expression.
-
visit
protected void visit(CelExpr expr, CelExpr.CelList list)
Visit aCelList
expression.
-
visit
protected void visit(CelExpr expr, CelExpr.CelComprehension comprehension)
Visit aCelComprehension
expression.Arguments to the comprehension are provided to the
visitArg(dev.cel.common.ast.CelExpr, dev.cel.common.ast.CelExpr, int)
function after they have beenvisit
ed.
-
visitArg
protected void visitArg(CelExpr expr, CelExpr arg, int argNum)
Visit the argument to an expression in the context of the calling expression.For
CelCall
expressions, the arg num refers to the ordinal of the argument.For
CelComprehension
expressions, the arg number refers to the ordinal of the enum value as it appears inCelExprVisitor.ComprehensionArg
.
-
-