Package dev.cel.runtime
Interface CelFunctionOverload
-
- All Known Subinterfaces:
Registrar.Function
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@Immutable @FunctionalInterface public interface CelFunctionOverloadInterface describing the general signature of all CEL custom function implementations.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceCelFunctionOverload.Binary<T1,T2>Helper interface for describing binary functions where the type parameters are used to improve compile-time correctness of function bindings.static interfaceCelFunctionOverload.Unary<T>Helper interface for describing unary functions where the type-parameter is used to improve compile-time correctness of function bindings.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Objectapply(java.lang.Object[] args)Evaluate a set of arguments throwing aCelExceptionon error.static booleancanHandle(java.lang.Object[] arguments, com.google.common.collect.ImmutableList<java.lang.Class<?>> parameterTypes, boolean isStrict)Returns true if the overload's expected argument types match the types of the given arguments.static booleancanHandle(java.lang.Object arg, com.google.common.collect.ImmutableList<java.lang.Class<?>> parameterTypes, boolean isStrict)static booleancanHandle(java.lang.Object arg1, java.lang.Object arg2, com.google.common.collect.ImmutableList<java.lang.Class<?>> parameterTypes, boolean isStrict)static booleancanHandleArg(java.lang.Object arg, java.lang.Class<?> paramType, boolean isStrict)
-
-
-
Method Detail
-
apply
java.lang.Object apply(java.lang.Object[] args) throws CelEvaluationExceptionEvaluate a set of arguments throwing aCelExceptionon error.- Throws:
CelEvaluationException
-
canHandle
static boolean canHandle(java.lang.Object[] arguments, com.google.common.collect.ImmutableList<java.lang.Class<?>> parameterTypes, boolean isStrict)Returns true if the overload's expected argument types match the types of the given arguments.
-
canHandle
static boolean canHandle(java.lang.Object arg, com.google.common.collect.ImmutableList<java.lang.Class<?>> parameterTypes, boolean isStrict)
-
canHandle
static boolean canHandle(java.lang.Object arg1, java.lang.Object arg2, com.google.common.collect.ImmutableList<java.lang.Class<?>> parameterTypes, boolean isStrict)
-
canHandleArg
static boolean canHandleArg(java.lang.Object arg, java.lang.Class<?> paramType, boolean isStrict)
-
-