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 CelFunctionOverload
    Interface describing the general signature of all CEL custom function implementations.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static interface  CelFunctionOverload.Binary<T1,​T2>
      Helper interface for describing binary functions where the type parameters are used to improve compile-time correctness of function bindings.
      static interface  CelFunctionOverload.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.Object apply​(java.lang.Object[] args)
      Evaluate a set of arguments throwing a CelException on error.
      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.
      static boolean canHandle​(java.lang.Object arg, com.google.common.collect.ImmutableList<java.lang.Class<?>> parameterTypes, boolean isStrict)  
      static boolean canHandle​(java.lang.Object arg1, java.lang.Object arg2, com.google.common.collect.ImmutableList<java.lang.Class<?>> parameterTypes, boolean isStrict)  
      static boolean canHandleArg​(java.lang.Object arg, java.lang.Class<?> paramType, boolean isStrict)  
    • Method Detail

      • 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)