public class SetFunction extends AbstractFunction<Object>
Function which wraps precisely one method of a class. It is used as
one function of a 'set' of functions.FunctionSets,
Serialized Form| Modifier and Type | Class and Description |
|---|---|
static class |
SetFunction.Type |
autoReturnType, name, returnType| Constructor and Description |
|---|
SetFunction(String name,
Parameter[] def,
Class clazz) |
SetFunction(String name,
Parameter[] def,
ReturnType<Object> returnType,
Class functionClass,
String methodName,
SetFunction.Type type) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getFunctionValue(Parameters parameters)
Executes the defined function supplying the given arguments.
|
protected Object |
getInstance() |
protected static Method |
getMethod(Class functionClass,
String methodName,
Parameters parameters)
Finds a method of a class more or less 'fuzzy'.
|
(package private) Object[] |
getValues(Parameters params) |
protected static Class<?> |
sophisticate(Class<?> primitive)
Simple utility method to convert primitive classes to their 'sophisticated' counterparts.
|
compareTo, createParameters, equals, getDescription, getFunctionValueWithList, getName, getParameterDefinition, getReturnType, hashCode, setDescription, setParameterDefinition, setReturnType, toStringSetFunction(String name, Parameter[] def, ReturnType<Object> returnType, Class functionClass, String methodName, SetFunction.Type type)
protected static Class<?> sophisticate(Class<?> primitive)
protected static Method getMethod(Class functionClass, String methodName, Parameters parameters)
Casting.canCast(java.lang.Class<? extends java.lang.Object>, java.lang.Class<? extends java.lang.Object>).Object[] getValues(Parameters params)
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()protected Object getInstance()
MMBase 1.9-SNAPSHOT - ${javadoctimestamp}