Interface CelParserBuilder
-
- All Known Implementing Classes:
CelParserImpl.Builder
public interface CelParserBuilder
Interface for building an instance of CelParser
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CelParserBuilder
addLibraries(CelParserLibrary... libraries)
Adds one or more libraries for parsingCelParserBuilder
addLibraries(java.lang.Iterable<? extends CelParserLibrary> libraries)
Adds a collection of libraries for parsingCelParserBuilder
addMacros(CelMacro... macros)
Registers the given macros, replacing any previous macros with the same key.CelParserBuilder
addMacros(java.lang.Iterable<CelMacro> macros)
Registers the given macros, replacing any previous macros with the same key.CelParser
build()
Build a new instance of theCelParser
.CelOptions
getOptions()
Retrieves the currently configuredCelOptions
for the parser.CelParserBuilder
setOptions(CelOptions celOptions)
Configures theCelOptions
used to enable fixes within the parser.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.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.
-
-
-
Method Detail
-
setOptions
@CanIgnoreReturnValue CelParserBuilder setOptions(CelOptions celOptions)
Configures theCelOptions
used to enable fixes within the parser.
-
getOptions
@CanIgnoreReturnValue CelOptions getOptions()
Retrieves the currently configuredCelOptions
for 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
.
-
-