|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.fernsroth.easyio.util.BeanUtils
public final class BeanUtils
| Method Summary | |
|---|---|
static java.lang.reflect.Method |
findGetterMethod(java.lang.Class<?> clazz,
java.lang.String name)
finds a getter method in a class. |
static java.lang.reflect.Method |
findSetterMethod(java.lang.Class<?> clazz,
java.lang.String name)
finds a setter method in the class. |
static java.util.List<java.lang.reflect.Field> |
getAllFields(java.lang.Class<?> clazz)
gets a list of all the fields including base classes. |
static java.lang.Object |
getValue(java.lang.Object obj,
java.lang.reflect.Field field)
gets a named value from an object. |
static void |
setValue(java.lang.Object obj,
java.lang.reflect.Field field,
java.lang.Object val)
sets a value into an object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.lang.Object getValue(java.lang.Object obj,
java.lang.reflect.Field field)
throws GetterNotFoundException
obj - the object to get the value from.field - the field to set.
GetterNotFoundException
public static java.lang.reflect.Method findGetterMethod(java.lang.Class<?> clazz,
java.lang.String name)
clazz - the class to get the metter method from.name - the name of the field.
public static java.util.List<java.lang.reflect.Field> getAllFields(java.lang.Class<?> clazz)
clazz - the class to read.
public static void setValue(java.lang.Object obj,
java.lang.reflect.Field field,
java.lang.Object val)
throws SetterNotFoundException
obj - the object to the value into.field - the field name.val - the value.
SetterNotFoundException
public static java.lang.reflect.Method findSetterMethod(java.lang.Class<?> clazz,
java.lang.String name)
clazz - the class to search.name - the name of the field.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||