Package dev.cel.runtime
Class CelLateFunctionBindings
- java.lang.Object
-
- dev.cel.runtime.CelLateFunctionBindings
-
- All Implemented Interfaces:
CelFunctionResolver
@Immutable public final class CelLateFunctionBindings extends java.lang.Object implements CelFunctionResolver
Collection ofCelFunctionBindingvalues which are intended to be created once per-evaluation, rather than once per-program setup.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<CelResolvedOverload>findOverloadMatchingArgs(java.lang.String functionName, java.lang.Object[] args)Finds a specific function overload to invoke based on given parameters, scanning all available overloads if necessary.java.util.Optional<CelResolvedOverload>findOverloadMatchingArgs(java.lang.String functionName, java.util.Collection<java.lang.String> overloadIds, java.lang.Object[] args)Finds a specific function overload to invoke based on given parameters.static CelLateFunctionBindingsfrom(CelFunctionBinding... functions)static CelLateFunctionBindingsfrom(java.util.Collection<CelFunctionBinding> functions)
-
-
-
Method Detail
-
findOverloadMatchingArgs
public java.util.Optional<CelResolvedOverload> findOverloadMatchingArgs(java.lang.String functionName, java.util.Collection<java.lang.String> overloadIds, java.lang.Object[] args) throws CelEvaluationException
Description copied from interface:CelFunctionResolverFinds a specific function overload to invoke based on given parameters.- Specified by:
findOverloadMatchingArgsin interfaceCelFunctionResolver- Parameters:
functionName- the logical name of the function being invoked.overloadIds- A list of function overload ids. The dispatcher selects the unique overload from this list with matching arguments.args- The arguments to pass to the function.- Returns:
- an optional value of the resolved overload.
- Throws:
CelEvaluationException- if the overload resolution is ambiguous,
-
findOverloadMatchingArgs
public java.util.Optional<CelResolvedOverload> findOverloadMatchingArgs(java.lang.String functionName, java.lang.Object[] args) throws CelEvaluationException
Description copied from interface:CelFunctionResolverFinds a specific function overload to invoke based on given parameters, scanning all available overloads if necessary.- Specified by:
findOverloadMatchingArgsin interfaceCelFunctionResolver- Parameters:
functionName- the logical name of the function being invoked.args- The arguments to pass to the function.- Returns:
- an optional value of the resolved overload.
- Throws:
CelEvaluationException- if the overload resolution is ambiguous.
-
from
public static CelLateFunctionBindings from(CelFunctionBinding... functions)
-
from
public static CelLateFunctionBindings from(java.util.Collection<CelFunctionBinding> functions)
-
-