Class CelCompilerImpl

  • All Implemented Interfaces:
    CelChecker, EnvVisitable, CelCompiler, CelParser

    @Immutable
    @Internal
    public final class CelCompilerImpl
    extends java.lang.Object
    implements CelCompiler, EnvVisitable
    CelCompiler implementation which uses either the legacy or modernized CEL-Java stack to offer a stream-lined expression parse/type-check experience, via a single compile method.

    CEL Library Internals. Do Not Use. Consumers should use factories, such as CelCompilerFactory instead to instantiate a compiler.

    • Method Detail

      • parse

        public CelValidationResult parse​(java.lang.String expression,
                                         java.lang.String description)
        Description copied from interface: CelParser
        Parse the input expression and return a CelValidationResult.

        The description may be used to help tailor error messages for the location where the expression originates, e.g. a file name or form UI element.

        Parse validates the syntax of an expression.

        Specified by:
        parse in interface CelParser
      • parse

        public CelValidationResult parse​(CelSource source)
        Description copied from interface: CelParser
        Parse the input expression and return a CelValidationResult.

        The description may be used to help tailor error messages for the location where the expression originates, e.g. a file name or form UI element.

        Parse validates the syntax of an expression.

        Specified by:
        parse in interface CelParser