org.codehaus.plexus.util
public final class ReflectionUtils extends Object
Version: $Id: ReflectionUtils.java 3086 2006-03-22 20:06:03Z jesse $
Constructor Summary | |
---|---|
ReflectionUtils() |
Method Summary | |
---|---|
static void | gatherVariablesAndValuesIncludingSuperclasses(Object object, Map map)
populates a map of the fields and values on a given object,
also pulls from superclasses
|
static Field | getFieldByNameIncludingSuperclasses(String fieldName, Class clazz) |
static Method | getSetter(String fieldName, Class clazz)
Finds a setter in the given class for the given field. |
static Object | getValueIncludingSuperclasses(String variable, Object object)
Generates a map of the fields and values on a given object,
also pulls from superclasses
|
static Map | getVariablesAndValuesIncludingSuperclasses(Object object)
Generates a map of the fields and values on a given object,
also pulls from superclasses
|
static void | setVariableValueInObject(Object object, String variable, Object value)
attempts to set the value to the variable in the object passed in
|
Parameters: object the object to generate the list of fields from map to populate
Parameters: fieldName the name of the field (i.e. 'fooBar'); it will search for a method named 'setFooBar'. clazz The class to find the method in.
Returns: null or the method found.
Parameters: object the object to generate the list of fields from
Returns: map containing the fields and their values
Parameters: object the object to generate the list of fields from
Returns: map containing the fields and their values
Parameters: object variable value
Throws: IllegalAccessException