public class Functions extends Object
| Constructor and Description |
|---|
Functions() |
| Modifier and Type | Method and Description |
|---|---|
static Parameters |
buildParameters(Parameter<?>[] def,
List<?> args)
Converts a certain List to an Parameters if it is not already one.
|
static List<Parameter<?>> |
define(Parameter<?>[] def) |
static List<Parameter<?>> |
define(Parameter<?>[] def,
List<Parameter<?>> list)
Adds the definitions to a List.
|
static Method |
getMethodFromClass(Class<?> claz,
String name) |
static Map<String,Parameter<?>[]> |
getParameterDefinitonsByReflection(Class<?> clazz,
Map<String,Parameter<?>[]> map)
Generates a map of Parameter[] objects for a given class through reflection.
|
public static Parameters buildParameters(Parameter<?>[] def, List<?> args)
public static List<Parameter<?>> define(Parameter<?>[] def, List<Parameter<?>> list)
Parameter.Wrapper's (recursively).public static Map<String,Parameter<?>[]> getParameterDefinitonsByReflection(Class<?> clazz, Map<String,Parameter<?>[]> map)
public final static Parameter[] AGE_PARAMETERS = {};
defines a function 'age' which takes no parameters.
public final static Parameter[] GUI_PARAMETERS = {
new Parameter("field", String.class),
Parameter.LANGUAGE
}
defines a function 'gui' which two parameters: 'field' and 'language'.
Results form reflection are stored in an internal cache.
The method returns the Parameter[] value (if any) of the function whose
name was given in the call. If the function cannot be derived through
reflection, the method returns null.FunctionProvider.addFunction(org.mmbase.util.functions.Function<?>)
instead.clazz - the class to perform reflection on.map - ParameterMMBase 1.9-SNAPSHOT - ${javadoctimestamp}