Interface CelCompiler

  • All Superinterfaces:
    CelChecker, CelParser
    All Known Implementing Classes:
    CelCompilerImpl

    @Immutable
    public interface CelCompiler
    extends CelParser, CelChecker
    CelCompiler bundles up the common concerns for parsing and type-checking exposes additional methods for performing both operations in a single pass.
    • Method Detail

      • compile

        default CelValidationResult compile​(java.lang.String expression)
        Compile the input expression and return a CelValidationResult.

        Compile will parse, then check the expression to validate the syntax and type-agreement of the expression.

      • compile

        default CelValidationResult compile​(java.lang.String expression,
                                            java.lang.String description)
        Compile 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.

        Compile will parse, then check the expression to validate the syntax and type-agreement of the expression.