Class FunctionService

java.lang.Object
dev.metaschema.core.metapath.function.FunctionService
All Implemented Interfaces:
IFunctionResolver

public final class FunctionService extends Object implements IFunctionResolver
Supports looking up named Metapath functions that are loaded using the ServiceLoader interface.
  • Constructor Details

    • FunctionService

      public FunctionService()
      Construct a new function service.
  • Method Details

    • getInstance

      @NonNull public static FunctionService getInstance()
      Get the singleton instance of the function service.
      Returns:
      the service instance
    • stream

      @NonNull public Stream<IFunction> stream()
      Retrieve the collection of function signatures in this library as a stream.
      Returns:
      a stream of function signatures
    • getFunction

      public IFunction getFunction(@NonNull IEnhancedQName name, int arity)
      Description copied from interface: IFunctionResolver
      Retrieve the function with the provided name that supports the signature of the provided methods.
      Specified by:
      getFunction in interface IFunctionResolver
      Parameters:
      name - the name of a group of functions
      arity - the count of arguments for use in determining an argument signature match
      Returns:
      the matching function