|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectorg.mmbase.util.functions.FunctionProvider
public abstract class FunctionProvider
A function provider maintains a set of Function objects.
| Field Summary | |
|---|---|
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 Summary | |
|---|---|
FunctionProvider()
The constructor of an FunctionProvider guesses the functions using reflection. |
|
| Method Summary | |
|---|---|
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)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Map<String,Function<?>> functions
protected Function<Collection<Function<?>>> getFunctions
| Constructor Detail |
|---|
public FunctionProvider()
| Method Detail |
|---|
protected Function<?> newFunctionInstance(String name,
Parameter<?>[] parameters,
ReturnType returnType)
public final 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()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||