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.ObjectCEL expression visitor implementation using Cel native types.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCelExprVisitor.ComprehensionArgComprehensionArg 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 protectedCelExprVisitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidvisit(CelExpr expr)Visit theexprvalue, routing to overloads based on the kind of expression.protected voidvisit(CelExpr expr, CelConstant constant)Visit aCelConstantexpression.protected voidvisit(CelExpr expr, CelExpr.CelCall call)Visit aCelCallexpression.protected voidvisit(CelExpr expr, CelExpr.CelComprehension comprehension)Visit aCelComprehensionexpression.protected voidvisit(CelExpr expr, CelExpr.CelIdent ident)Visit anCelIdentexpression.protected voidvisit(CelExpr expr, CelExpr.CelList list)Visit aCelListexpression.protected voidvisit(CelExpr expr, CelExpr.CelMap map)Visit aCelMapexpression.protected voidvisit(CelExpr expr, CelExpr.CelSelect select)Visit aCelSelectexpression.protected voidvisit(CelExpr expr, CelExpr.CelStruct struct)Visit aCelStructexpression.voidvisit(CelAbstractSyntaxTree ast)Visit theastvalue, routing to overloads based on the kind of expression.protected voidvisitArg(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 theastvalue, routing to overloads based on the kind of expression.
-
visit
public void visit(CelExpr expr)
Visit theexprvalue, routing to overloads based on the kind of expression.
-
visit
protected void visit(CelExpr expr, CelExpr.CelIdent ident)
Visit anCelIdentexpression.
-
visit
protected void visit(CelExpr expr, CelConstant constant)
Visit aCelConstantexpression.
-
visit
protected void visit(CelExpr expr, CelExpr.CelSelect select)
Visit aCelSelectexpression.
-
visit
protected void visit(CelExpr expr, CelExpr.CelCall call)
Visit aCelCallexpression.Arguments to the call are provided to the
visitArg(dev.cel.common.ast.CelExpr, dev.cel.common.ast.CelExpr, int)function after they have beenvisited.
-
visit
protected void visit(CelExpr expr, CelExpr.CelStruct struct)
Visit aCelStructexpression.
-
visit
protected void visit(CelExpr expr, CelExpr.CelMap map)
Visit aCelMapexpression.
-
visit
protected void visit(CelExpr expr, CelExpr.CelList list)
Visit aCelListexpression.
-
visit
protected void visit(CelExpr expr, CelExpr.CelComprehension comprehension)
Visit aCelComprehensionexpression.Arguments to the comprehension are provided to the
visitArg(dev.cel.common.ast.CelExpr, dev.cel.common.ast.CelExpr, int)function after they have beenvisited.
-
visitArg
protected void visitArg(CelExpr expr, CelExpr arg, int argNum)
Visit the argument to an expression in the context of the calling expression.For
CelCallexpressions, the arg num refers to the ordinal of the argument.For
CelComprehensionexpressions, the arg number refers to the ordinal of the enum value as it appears inCelExprVisitor.ComprehensionArg.
-
-