public class BeanWrapper
extends java.lang.Object
| 构造器和说明 |
|---|
BeanWrapper(java.lang.Object target) |
| 限定符和类型 | 方法和说明 |
|---|---|
java.beans.PropertyDescriptor |
getPropertyDescriptor(java.lang.String propertyName)
Obtain the property descriptor for a specific property
of the wrapped object.
|
java.beans.PropertyDescriptor[] |
getPropertyDescriptors()
Obtain the PropertyDescriptors for the wrapped object
(as determined by standard JavaBeans introspection).
|
java.lang.Class |
getPropertyType(java.lang.String fixedField) |
java.lang.Object |
getPropertyValue(java.lang.String field) |
java.lang.Class |
getWrappedClass()
Return the type of the wrapped JavaBean object.
|
java.lang.Object |
getWrappedInstance()
Return the bean instance wrapped by this object, if any.
|
void |
setWrappedInstance(java.lang.Object obj)
Change the wrapped JavaBean object.
|
public void setWrappedInstance(java.lang.Object obj)
obj - the bean instance to wrap
in favor of recreating a BeanWrapper per target instancepublic java.lang.Object getWrappedInstance()
null if none setpublic java.lang.Class getWrappedClass()
null if no wrapped object has been setpublic java.beans.PropertyDescriptor[] getPropertyDescriptors()
public java.beans.PropertyDescriptor getPropertyDescriptor(java.lang.String propertyName)
throws org.frameworkset.util.beans.BeansException
propertyName - the property to obtain the descriptor for
(may be a nested path, but no indexed/mapped property)InvalidPropertyException - if there is no such propertyorg.frameworkset.util.beans.BeansExceptionpublic java.lang.Class getPropertyType(java.lang.String fixedField)
public java.lang.Object getPropertyValue(java.lang.String field)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException
java.lang.IllegalArgumentExceptionjava.lang.IllegalAccessExceptionjava.lang.reflect.InvocationTargetException