Class FunctionService
- java.lang.Object
-
- gov.nist.secauto.metaschema.core.metapath.function.FunctionService
-
public final class FunctionService extends Object
-
-
Constructor Summary
Constructors Constructor Description FunctionService()
Construct a new function service.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description IFunction
getFunction(String name, IExpression... arguments)
Retrieve the function with the provided name that supports the signature of the provided methods, if such a function exists.IFunction
getFunction(String name, List<IExpression> arguments)
Retrieve the function with the provided name that supports the signature of the provided methods, if such a function exists.static FunctionService
getInstance()
Get the singleton instance of the function service.IFunctionLibrary
load()
Load all known functions registered with this function service.
-
-
-
Constructor Detail
-
FunctionService
public FunctionService()
Construct a new function service.
-
-
Method Detail
-
getInstance
public static FunctionService getInstance()
Get the singleton instance of the function service.- Returns:
- the service instance
-
load
@NonNull public IFunctionLibrary load()
Load all known functions registered with this function service.- Returns:
- the function library
-
getFunction
public IFunction getFunction(@NonNull String name, @NonNull IExpression... arguments)
Retrieve the function with the provided name that supports the signature of the provided methods, if such a function exists.- Parameters:
name
- the name of a group of functionsarguments
- a list of argument expressions for use in determining an argument signature match- Returns:
- the matching function or
null
if no match exists - Throws:
StaticMetapathException
- if a matching function was not found
-
getFunction
public IFunction getFunction(@NonNull String name, @NonNull List<IExpression> arguments)
Retrieve the function with the provided name that supports the signature of the provided methods, if such a function exists.- Parameters:
name
- the name of a group of functionsarguments
- a list of argument expressions for use in determining an argument signature match- Returns:
- the matching function
- Throws:
StaticMetapathException
- if a matching function was not found
-
-