Class 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 the expr value, routing to overloads based on the kind of expression.
      protected void visit​(Expr expr, Constant constant)
      Visit a Expr.Constant expression.
      protected void visit​(Expr expr, Expr.Call call)
      Visit a Expr.Call expression.
      protected void visit​(Expr expr, Expr.Comprehension comprehension)
      Visit a Expr.Comprehension expression.
      protected void visit​(Expr expr, Expr.CreateList createList)
      Visit a Expr.CreateList expression.
      protected void visit​(Expr expr, Expr.CreateStruct createStruct)
      Visit a Expr.CreateStruct expression.
      protected void visit​(Expr expr, Expr.Ident ident)
      Visit an Expr.Ident expression.
      protected void visit​(Expr expr, Expr.Select select)
      Visit a Expr.Select expression.
      protected void visitArg​(Expr expr, Expr arg, int argNum)
      Visit the argument to an expression in the context of the calling expression.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ExprVisitor

        protected ExprVisitor()
    • Method Detail

      • visit

        public void visit​(Expr expr)
        Visit the expr value, routing to overloads based on the kind of expression.
      • visit

        protected void visit​(Expr expr,
                             Expr.Ident ident)
        Visit an Expr.Ident expression.
      • visit

        protected void visit​(Expr expr,
                             Constant constant)
        Visit a Expr.Constant expression.
      • visit

        protected void visit​(Expr expr,
                             Expr.Select select)
        Visit a Expr.Select expression.
      • visit

        protected void visit​(Expr expr,
                             Expr.CreateStruct createStruct)
        Visit a Expr.CreateStruct expression.
      • visit

        protected void visit​(Expr expr,
                             Expr.CreateList createList)
        Visit a Expr.CreateList expression.
      • 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 in ExprVisitor.ComprehensionArg.