Class DefaultFunction
- java.lang.Object
-
- gov.nist.secauto.metaschema.core.metapath.function.AbstractFunction
-
- gov.nist.secauto.metaschema.core.metapath.function.DefaultFunction
-
- All Implemented Interfaces:
IFunction
public class DefaultFunction extends AbstractFunction
Provides a concrete implementation of a function call executor.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
DefaultFunction.CallingContext
-
Nested classes/interfaces inherited from interface gov.nist.secauto.metaschema.core.metapath.function.IFunction
IFunction.Builder, IFunction.FunctionProperty
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static List<ISequence<?>>
convertArguments(IFunction function, List<ISequence<?>> parameters)
Converts arguments in an attempt to align with the function's signature.protected static ISequence<?>
convertSequence(IArgument argument, ISequence<?> sequence)
Based on XPath 3.1 function conversion rules.boolean
equals(Object obj)
ISequence<?>
execute(List<ISequence<?>> arguments, DynamicContext dynamicContext, ISequence<?> focus)
Set<IFunction.FunctionProperty>
getProperties()
Retrieve the set of assigned function properties.ISequenceType
getResult()
Retrieve the function result sequence type.int
hashCode()
String
toSignature()
Get the signature of the function as a string.String
toString()
-
Methods inherited from class gov.nist.secauto.metaschema.core.metapath.function.AbstractFunction
arity, getArguments, getName, getNamespace
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface gov.nist.secauto.metaschema.core.metapath.function.IFunction
getQName, isArityUnbounded, isContextDepenent, isDeterministic, isFocusDepenent
-
-
-
-
Method Detail
-
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
-
convertArguments
@NonNull public static List<ISequence<?>> convertArguments(@NonNull IFunction function, @NonNull List<ISequence<?>> parameters)
Converts arguments in an attempt to align with the function's signature.- Parameters:
function
- the functionparameters
- the argument parameters- Returns:
- the converted argument list
-
convertSequence
@NonNull protected static ISequence<?> convertSequence(@NonNull IArgument argument, @NonNull ISequence<?> sequence)
Based on XPath 3.1 function conversion rules.- Parameters:
argument
- the function argument signature detailssequence
- the sequence to convert- Returns:
- the converted sequence
-
execute
public ISequence<?> execute(@NonNull List<ISequence<?>> arguments, @NonNull DynamicContext dynamicContext, @NonNull ISequence<?> focus)
-
toSignature
public String toSignature()
Description copied from interface:IFunction
Get the signature of the function as a string.- Returns:
- the signature
-
-