public class MethodFunction extends AbstractFunction<Object>
Name to attribute the
parameter names. A method function can e.g. be defined like so in the builder xml:
nl.didactor.component.assessment.LessonChecker
]]>
And be implemented like so:
public static boolean canCloseLesson(@Required @Name("node") Node user,
@Required @Name("lesson") Node lesson) {
...
}
MMObjectBuilder.executeFunction(org.mmbase.module.core.MMObjectNode, java.lang.String, java.util.List<?>),
Node.getFunctionValue(java.lang.String, java.util.List<?>),
BeanFunction,
Serialized FormautoReturnType, name, returnType| Constructor and Description |
|---|
MethodFunction(Method method) |
MethodFunction(Method method,
Object instance) |
MethodFunction(Method method,
String name) |
MethodFunction(Method method,
String name,
Object instance) |
| Modifier and Type | Method and Description |
|---|---|
static Function<Object> |
getFunction(Class<?> clazz,
String name)
Returns the MethodFunction representing the method 'name' in class 'clazz'.
|
static Function<Object> |
getFunction(Method method,
String name) |
static Function<Object> |
getFunction(Method method,
String name,
Object instance) |
Object |
getFunctionValue(Parameters parameters)
Executes the defined function supplying the given arguments.
|
static Method |
getMethod(Class<?> clazz,
String name) |
compareTo, createParameters, equals, getDescription, getFunctionValueWithList, getName, getParameterDefinition, getReturnType, hashCode, setDescription, setParameterDefinition, setReturnType, toStringpublic MethodFunction(Method method)
public static Function<Object> getFunction(Method method, String name, Object instance)
public static Function<Object> getFunction(Class<?> clazz, String name)
public Object getFunctionValue(Parameters parameters)
AbstractFunctiongetFunctionValue in interface Function<Object>getFunctionValue in class AbstractFunction<Object>parameters - The parameters for the function. To specify an empty parameter list use Parameters.VOID.
Implementors are encouraged to support null too.AbstractFunction.getReturnType()AbstractFunction.createParameters()MMBase 1.9-SNAPSHOT - ${javadoctimestamp}