Interface CelFunctionBinding

  • All Known Subinterfaces:
    InternalCelFunctionBinding

    @Immutable
    public interface CelFunctionBinding
    Binding consisting of an overload id, a Java-native argument signature, and an overload definition.

    While the CEL function has a human-readable camelCase name, overload ids should use the following convention where all <type> names should be ASCII lower-cased. For types prefer the unparameterized simple name of time, or unqualified name of any proto-based type:

    • unary member function: _
    • binary member function: __
    • unary global function: _
    • binary global function: __
    • global function: ___

    Examples: string_startsWith_string, mathMax_list, lessThan_money_money

    • Method Detail

      • getOverloadId

        java.lang.String getOverloadId()
      • getArgTypes

        com.google.common.collect.ImmutableList<java.lang.Class<?>> getArgTypes()
      • isStrict

        boolean isStrict()
      • from

        static <T1,​T2> CelFunctionBinding from​(java.lang.String overloadId,
                                                     java.lang.Class<T1> arg1,
                                                     java.lang.Class<T2> arg2,
                                                     CelFunctionOverload.Binary<T1,​T2> impl)
        Create a binary function binding from the overloadId, arg1, arg2, and impl.
      • from

        static CelFunctionBinding from​(java.lang.String overloadId,
                                       java.lang.Iterable<java.lang.Class<?>> argTypes,
                                       CelFunctionOverload impl)
        Create a function binding from the overloadId, argTypes, and impl.
      • fromOverloads

        static com.google.common.collect.ImmutableSet<CelFunctionBinding> fromOverloads​(java.lang.String functionName,
                                                                                        java.util.Collection<CelFunctionBinding> overloadBindings)
        Creates a set of bindings for a function, enabling dynamic dispatch logic to select the correct overload at runtime based on argument types.