Class DefaultFunction

java.lang.Object
dev.metaschema.core.metapath.function.impl.AbstractFunction
dev.metaschema.core.metapath.function.DefaultFunction
All Implemented Interfaces:
IFunction, ICollectionValue, IItem

public class DefaultFunction extends dev.metaschema.core.metapath.function.impl.AbstractFunction
Provides a concrete implementation of a function call executor.
  • Method Details

    • getProperties

      public Set<IFunction.FunctionProperty> getProperties()
      Description copied from interface: IFunction
      Retrieve the set of assigned function properties.
      Returns:
      the set of properties or an empty set
    • getResult

      public ISequenceType getResult()
      Description copied from interface: IFunction
      Retrieve the function result sequence type.
      Returns:
      the function result sequence type
    • isNamedFunction

      public boolean isNamedFunction()
      Description copied from interface: IFunction
      Determine if the function is a named function.
      Returns:
      true if the function is named or false if the function is anonymous
    • executeInternal

      @NonNull protected ISequence<?> executeInternal(@NonNull List<ISequence<?>> arguments, @NonNull DynamicContext dynamicContext, @Nullable IItem focus)
      Execute the provided function using the provided arguments, dynamic context, and focus.
      Specified by:
      executeInternal in class dev.metaschema.core.metapath.function.impl.AbstractFunction
      Parameters:
      arguments - the function arguments
      dynamicContext - the dynamic evaluation context
      focus - the current focus item in the evaluation context. This represents the context item for anonymous function evaluation. May be null for functions that don't require context item access.
      Returns:
      a sequence containing the result of the execution
      Throws:
      MetapathException - if an error occurred while executing the function