Package dev.cel.runtime
Interface CelFunctionResolver
-
- All Known Implementing Classes:
CelLateFunctionBindings,DefaultDispatcher
@ThreadSafe public interface CelFunctionResolverInterface to a resolver for CEL functions based on the function name, overload ids, and arguments.
-
-
Method Summary
All Methods Instance Methods Abstract 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.
-
-
-
Method Detail
-
findOverloadMatchingArgs
java.util.Optional<CelResolvedOverload> findOverloadMatchingArgs(java.lang.String functionName, java.util.Collection<java.lang.String> overloadIds, java.lang.Object[] args) throws CelEvaluationException
Finds a specific function overload to invoke based on given parameters.- 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
java.util.Optional<CelResolvedOverload> findOverloadMatchingArgs(java.lang.String functionName, java.lang.Object[] args) throws CelEvaluationException
Finds a specific function overload to invoke based on given parameters, scanning all available overloads if necessary.- 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.
-
-