|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjfun.util.beans.Bean
public final class Bean
A wrapper class for Java Bean object.
Zephyr Business Solutions Corp.
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
BeanType |
getBeanType()
Get the BeanType object for this object. |
java.lang.Object |
getObject()
Get the Java bean object. |
java.lang.Object |
getProperty(java.lang.String name)
Get value for a property. |
java.lang.Object |
getProperty(java.lang.String name,
int ind)
Get value for an indexed property. |
int |
hashCode()
|
static Bean |
instance(BeanType btype,
java.lang.Object obj)
Create a Bean object for a Java object. |
static Bean |
instance(java.lang.Class type,
java.lang.Object obj)
Create a Bean object for a Java object. |
static Bean |
instance(java.lang.Object obj)
Create a Bean object for a Java object. |
Bean |
setProperty(java.lang.String name,
int ind,
java.lang.Object val)
Set value for an indexed property. |
Bean |
setProperty(java.lang.String name,
java.lang.Object val)
Set value for a property. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public java.lang.Object getObject()
public BeanType getBeanType()
public java.lang.Object getProperty(java.lang.String name) throws NoSuchPropertyException, PropertyNotReadableException, java.lang.reflect.InvocationTargetException, java.lang.IllegalAccessException
name
- the property name.
NoSuchPropertyException
- when the property is not found.
PropertyNotReadableException
- when the property cannot be read.
java.lang.reflect.InvocationTargetException
- any exception caused by the getter method.
java.lang.IllegalAccessException
- if access to the getter method failed.public Bean setProperty(java.lang.String name, java.lang.Object val) throws NoSuchPropertyException, PropertyNotWritableException, java.lang.reflect.InvocationTargetException, java.lang.IllegalAccessException
This method also handles properties accessed by index. When the property requires an index, the value has to be an array or null, where null is equivalent to an empty array. *
The array elements are then set to the property by index from 0 up.
name
- the property name.val
- the new value of the property.
NoSuchPropertyException
- when the property cannot be found.
PropertyNotWritableException
- when the property is not writable.
java.lang.reflect.InvocationTargetException
- any exception caused by the setter method.
java.lang.IllegalAccessException
- if access to the setter method failed.public java.lang.Object getProperty(java.lang.String name, int ind) throws NoSuchPropertyException, PropertyNotReadableException, java.lang.reflect.InvocationTargetException
name
- the property name.ind
- the index.
NoSuchPropertyException
- when the property is not found.
PropertyNotReadableException
- when the property cannot be read.
java.lang.Throwable
- any exception caused by the getter method.
java.lang.reflect.InvocationTargetException
public Bean setProperty(java.lang.String name, int ind, java.lang.Object val) throws NoSuchPropertyException, PropertyNotWritableException, java.lang.reflect.InvocationTargetException
name
- the property name.ind
- the index.val
- the new value of the property.
NoSuchPropertyException
- when the property cannot be found.
PropertyNotWritableException
- when the property is not writable.
java.lang.Throwable
- any exception caused by the setter method.
java.lang.reflect.InvocationTargetException
public static Bean instance(java.lang.Object obj) throws java.beans.IntrospectionException
obj
- the object.
java.Beans.IntrospectionException
java.beans.IntrospectionException
public static Bean instance(java.lang.Class type, java.lang.Object obj) throws java.beans.IntrospectionException
type
- the type used to introspect properties.obj
- the object.
java.Beans.IntrospectionException
java.beans.IntrospectionException
public static Bean instance(BeanType btype, java.lang.Object obj)
btype
- the bean type containing the meta information for all properties.obj
- the object.
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |