public abstract class FunctionProvider extends Object
Function objects.| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Function<?>> |
functions |
protected Function<Collection<Function<?>>> |
getFunctions
Every Function Provider provides least the 'getFunctions' function, which returns a Set of all functions which it provides.
|
| Constructor and Description |
|---|
FunctionProvider()
The constructor of an FunctionProvider guesses the functions using reflection.
|
| Modifier and Type | Method and Description |
|---|---|
Function<?> |
addFunction(Function<?> function)
Adds a function to the FunctionProvider.
|
Parameters |
createParameters(String functionName)
Creates a new empty Parameters object for given function.
|
Function<?> |
getFunction(String functionName)
Returns the Function object with given name.
|
Collection<Function<?>> |
getFunctions()
Returns a Collection of all functions currently provided by the FunctionProvider.
|
Object |
getFunctionValue(String functionName,
List<?> parameters)
Executes a function, and returns the function value.
|
protected Function<?> |
newFunctionInstance(String name,
Parameter<?>[] parameters,
ReturnType returnType) |
protected Function<Collection<Function<?>>> getFunctions
public FunctionProvider()
protected Function<?> newFunctionInstance(String name, Parameter<?>[] parameters, ReturnType returnType)
public Function<?> addFunction(Function<?> function)
null if no such function.public Parameters createParameters(String functionName)
null if no such function.public Object getFunctionValue(String functionName, List<?> parameters)
null if no such function.public Function<?> getFunction(String functionName)
null if no such function is provided.public Collection<Function<?>> getFunctions()
MMBase 1.9-SNAPSHOT - ${javadoctimestamp}