Interface CelParserBuilder
-
- All Known Implementing Classes:
CelParserImpl.Builder
public interface CelParserBuilderInterface for building an instance of CelParser
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CelParserBuilderaddLibraries(CelParserLibrary... libraries)Adds one or more libraries for parsingCelParserBuilderaddLibraries(java.lang.Iterable<? extends CelParserLibrary> libraries)Adds a collection of libraries for parsingCelParserBuilderaddMacros(CelMacro... macros)Registers the given macros, replacing any previous macros with the same key.CelParserBuilderaddMacros(java.lang.Iterable<CelMacro> macros)Registers the given macros, replacing any previous macros with the same key.CelParserbuild()Build a new instance of theCelParser.CelOptionsgetOptions()Retrieves the currently configuredCelOptionsfor the parser.CelParserBuildersetOptions(CelOptions celOptions)Configures theCelOptionsused to enable fixes within the parser.CelParserBuildersetStandardMacros(CelStandardMacro... macros)Sets the macro set defined as part of CEL standard library for the parser, replacing the macros from any prior call.CelParserBuildersetStandardMacros(java.lang.Iterable<CelStandardMacro> macros)Sets the macro set defined as part of CEL standard library for the parser, replacing the macros from any prior call.
-
-
-
Method Detail
-
setOptions
@CanIgnoreReturnValue CelParserBuilder setOptions(CelOptions celOptions)
Configures theCelOptionsused to enable fixes within the parser.
-
getOptions
@CanIgnoreReturnValue CelOptions getOptions()
Retrieves the currently configuredCelOptionsfor the parser.
-
setStandardMacros
@CanIgnoreReturnValue CelParserBuilder setStandardMacros(CelStandardMacro... macros)
Sets the macro set defined as part of CEL standard library for the parser, replacing the macros from any prior call.
-
setStandardMacros
@CanIgnoreReturnValue CelParserBuilder setStandardMacros(java.lang.Iterable<CelStandardMacro> macros)
Sets the macro set defined as part of CEL standard library for the parser, replacing the macros from any prior call.
-
addMacros
@CanIgnoreReturnValue CelParserBuilder addMacros(CelMacro... macros)
Registers the given macros, replacing any previous macros with the same key.Use this to register a set of user-defined custom macro implementation for the parser. For registering macros defined as part of CEL standard library, use
setStandardMacros(dev.cel.parser.CelStandardMacro...)instead.Custom macros should not use the same function names as the ones found in
CelStandardMacro(ex: has, all, exists, etc.). Build method will throw if both standard macros and custom macros are set with the same name.
-
addMacros
@CanIgnoreReturnValue CelParserBuilder addMacros(java.lang.Iterable<CelMacro> macros)
Registers the given macros, replacing any previous macros with the same key.Use this to register a set of user-defined custom macro implementation for the parser. For registering macros defined as part of CEL standard library, use
setStandardMacros(dev.cel.parser.CelStandardMacro...)instead.Custom macros should not use the same function names as the ones found in
CelStandardMacro(ex: has, all, exists, etc.). Build method will throw if both standard macros and custom macros are set with the same name.
-
addLibraries
@CanIgnoreReturnValue CelParserBuilder addLibraries(CelParserLibrary... libraries)
Adds one or more libraries for parsing
-
addLibraries
@CanIgnoreReturnValue CelParserBuilder addLibraries(java.lang.Iterable<? extends CelParserLibrary> libraries)
Adds a collection of libraries for parsing
-
build
@CheckReturnValue CelParser build()
Build a new instance of theCelParser.
-
-