|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.base.apps.beans.util.BeanUtil
public class BeanUtil
Utility class for bean-related functionality.
| Method Summary | |
|---|---|
static BeanInfo |
getBeanInfo(Class<?> beanClass)
Returns the BeanInfo for the given class. |
static BeanInfo |
getBeanInfo(Object bean)
Returns the BeanInfo for the given bean. |
static PropertyDescriptor[] |
getPropertyDescriptors(Class<?> beanClass)
Returns the property descriptors for the given class. |
static PropertyDescriptor[] |
getPropertyDescriptors(Object bean)
Returns the property descriptors for the given bean. |
static boolean |
isDeprecated(Method read,
Method write)
Returns true if either the given accessor or mutator has
been annoted with Deprecated. |
static Map<String,PropertyDescriptor> |
loadBoundDescriptors(Object bean,
boolean excludeReadOnly)
Loads bound properties, those with getters and setters, from the given bean. |
static Map<String,PropertyDescriptor> |
loadDescriptors(Class<?> clz)
Extracts all PropertyDescriptors from the specified class and
returns them mapped by name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static BeanInfo getBeanInfo(Class<?> beanClass)
BeanInfo for the given class.
beanClass - The given class.
BeanInfo.
IllegalArgumentException - if the given class is null.public static BeanInfo getBeanInfo(Object bean)
BeanInfo for the given bean.
bean - The given bean.
BeanInfo.
IllegalArgumentException - if the given bean is null.public static PropertyDescriptor[] getPropertyDescriptors(Class<?> beanClass)
beanClass - The given class.
IllegalArgumentException - if the given class is null.public static PropertyDescriptor[] getPropertyDescriptors(Object bean)
bean - The given bean.
IllegalArgumentException - if the given bean is null.public static Map<String,PropertyDescriptor> loadDescriptors(Class<?> clz)
PropertyDescriptors from the specified class and
returns them mapped by name.
Any class from the JDK will be ignored and return an empty map. More
specifically, if the given class resides in the "java" package
hierarchy, an empty map will be returned.
clz - The class from which to extract descriptors.
null map of descriptors, keyed by property name.
public static Map<String,PropertyDescriptor> loadBoundDescriptors(Object bean,
boolean excludeReadOnly)
bean - The given bean from which to load descriptors.excludeReadOnly - If true, properties without setters will be excluded.
public static boolean isDeprecated(Method read,
Method write)
true if either the given accessor or mutator has
been annoted with Deprecated.
read - An accessor method of a property.write - A mutator method of a property.
true if either the given accessor or mutator has
been annoted with Deprecated.
|
Please visit Base Apps, hosted on Sourceforge.net. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||