Class FunctionLibrary

    • Method Detail

      • registerFunction

        public void registerFunction​(@NonNull
                                     IFunction function)
        Register the provided function signature.
        Parameters:
        function - the function signature to register
        Throws:
        IllegalArgumentException - if the provided function has the same arity as a previously registered function with the same name
      • getFunction

        public IFunction getFunction​(@NonNull
                                     String name,
                                     @NonNull
                                     List<IExpression> args)
        Description copied from interface: IFunctionLibrary
        Retrieve the function with the provided name that supports the signature of the provided methods, if such a function exists.
        Specified by:
        getFunction in interface IFunctionLibrary
        Parameters:
        name - the name of a group of functions
        args - a list of argument expressions for use in determining an argument signature match
        Returns:
        the matching function or null if no match exists
      • getFunction

        public IFunction getFunction​(@NonNull
                                     QName name,
                                     @NonNull
                                     List<IExpression> args)
        Description copied from interface: IFunctionLibrary
        Retrieve the function with the provided namespace qualified name that supports the signature of the provided methods, if such a function exists.
        Specified by:
        getFunction in interface IFunctionLibrary
        Parameters:
        name - the namespace qualified name of a group of functions
        args - a list of argument expressions for use in determining an argument signature match
        Returns:
        the matching function or null if no match exists