Class DefaultDispatcher

  • All Implemented Interfaces:
    CelFunctionResolver

    @Immutable
    @Internal
    public final class DefaultDispatcher
    extends java.lang.Object
    implements CelFunctionResolver
    Default implementation of dispatcher.

    CEL Library Internals. Do Not Use.

    • Method Detail

      • findOverload

        public java.util.Optional<CelResolvedOverload> findOverload​(java.lang.String functionName)
      • findOverloadMatchingArgs

        public java.util.Optional<CelResolvedOverload> findOverloadMatchingArgs​(java.lang.String functionName,
                                                                                java.lang.Object[] args)
                                                                         throws CelEvaluationException
        Description copied from interface: CelFunctionResolver
        Finds a specific function overload to invoke based on given parameters, scanning all available overloads if necessary.
        Specified by:
        findOverloadMatchingArgs in interface CelFunctionResolver
        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.
      • 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: CelFunctionResolver
        Finds a specific function overload to invoke based on given parameters.
        Specified by:
        findOverloadMatchingArgs in interface CelFunctionResolver
        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,