org.mmbase.util.functions
Class SetFunction
java.lang.Object
org.mmbase.util.functions.AbstractFunction<Object>
org.mmbase.util.functions.SetFunction
- All Implemented Interfaces:
- Serializable, Comparable<Function<Object>>, Function<Object>
public class SetFunction
- extends AbstractFunction<Object>
A SetFunction is a Function which wraps precisely one method of a class. It is used as
one function of a 'set' of functions.
- Since:
- MMBase-1.8
- Version:
- $Id: SetFunction.java 45316 2011-02-18 20:47:28Z michiel $
- Author:
- Michiel Meeuwissen, Daniel Ockeloen, Pierre van Rooden
- See Also:
FunctionSets,
Serialized Form
| Methods inherited from class org.mmbase.util.functions.AbstractFunction |
compareTo, createParameters, equals, getDescription, getFunctionValueWithArgs, getFunctionValueWithList, getName, getParameterDefinition, getReturnType, hashCode, setDescription, setParameterDefinition, setReturnType, toString |
SetFunction
SetFunction(String name,
Parameter[] def,
ReturnType<Object> returnType,
Class functionClass,
String methodName,
SetFunction.Type type)
SetFunction
public SetFunction(String name,
Parameter[] def,
Class clazz)
- Since:
- MMBase-1.8.5
sophisticate
protected static Class<?> sophisticate(Class<?> primitive)
- Simple utility method to convert primitive classes to their 'sophisticated' counterparts.
- Since:
- MMBase-1.8.5
getMethod
protected static Method getMethod(Class functionClass,
String methodName,
Parameters parameters)
- Finds a method of a class more or less 'fuzzy'. Depending on e.g.
Casting.canCast(java.lang.Class>, java.lang.Class>).
- Since:
- MMBase-1.9.2
getValues
Object[] getValues(Parameters params)
- Since:
- MMBase-1.9.2
getFunctionValue
public Object getFunctionValue(Parameters parameters)
- Description copied from class:
AbstractFunction
- Executes the defined function supplying the given arguments.
- Specified by:
getFunctionValue in interface Function<Object>- Specified by:
getFunctionValue in class AbstractFunction<Object>
- Parameters:
parameters - The parameters for the function. To specify an empty parameter list use Parameters.VOID.
Implementors are encouraged to support null too.
- Returns:
- The function value, which can be of any type compatible to
AbstractFunction.getReturnType() - See Also:
AbstractFunction.createParameters()
getInstance
protected Object getInstance()
MMBase2 Bridge 2.0-SNAPSHOT - 2013-03-30T06:34