|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.util.functions.Functions
public class Functions
This class defines static methods for defining Function and Parameters objects. These methods include ways to retrieve Function definitions for a class using reflection, and methods to convert a List to a Parameters object, and a Parameter array to a List.
| Constructor Summary | |
|---|---|
Functions()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Functions()
| Method Detail |
|---|
public static Parameters buildParameters(Parameter<?>[] def,
List<?> args)
public static List<Parameter<?>> define(Parameter<?>[] def,
List<Parameter<?>> list)
Parameter.Wrapper's (recursively).
public static List<Parameter<?>> define(Parameter<?>[] def)
public static Method getMethodFromClass(Class<?> claz,
String name)
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 -
Parameter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||