|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.yajul.util.BeanProperties
public class BeanProperties
Represents the property accessor methods for a given class, and provides methods for accessing the properties at run-time.
| Constructor Summary | |
|---|---|
BeanProperties(java.lang.Class c)
Constructs a set of property accessors from the class. |
|
| Method Summary | |
|---|---|
java.util.Iterator |
accessorMethods()
Returns an iterator that returns all AccessorMethods for all properties in the class. |
void |
copy(java.lang.Object bean,
java.lang.Object copy)
Copies all of the properties from one bean into another. |
PropertyAccessors |
getAccessorMethods(java.lang.String propertyName)
Returns the pair of accessor methods for the given property name. |
java.lang.String |
getClassName()
Returns the name of the class. |
double |
getDoubleProperty(java.lang.Object bean,
java.lang.String propertyName)
Returns a double property value. |
int |
getIntProperty(java.lang.Object bean,
java.lang.String propertyName)
Returns an int property value. |
java.lang.Object |
getProperty(java.lang.Object bean,
java.lang.String propertyName)
Returns the value of the specified property. |
java.util.Set |
getPropertyNames()
Returns the set of all the property name Strings in the class. |
java.util.Iterator |
propertyNames()
Returns an iterator that returns the String names of all properties in the class. |
java.lang.Object |
setProperty(java.lang.Object bean,
java.lang.String propertyName,
java.lang.Object value)
Sets the property in the bean to the specified value. |
int |
size()
Returns the number of properties in the class. |
java.util.Collection<java.lang.Object> |
values(java.lang.Object bean)
Returns a collection of all of the property values in the specified bean. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BeanProperties(java.lang.Class c)
c - the class| Method Detail |
|---|
public java.lang.String getClassName()
public int size()
public java.lang.Object getProperty(java.lang.Object bean,
java.lang.String propertyName)
bean - the objectpropertyName - the name of the property to get
public java.lang.Object setProperty(java.lang.Object bean,
java.lang.String propertyName,
java.lang.Object value)
bean - the object to set the property inpropertyName - the name of the propertyvalue - the new property value
public java.util.Iterator propertyNames()
public java.util.Set getPropertyNames()
public PropertyAccessors getAccessorMethods(java.lang.String propertyName)
propertyName - the property name.
public java.util.Iterator accessorMethods()
public double getDoubleProperty(java.lang.Object bean,
java.lang.String propertyName)
bean - the beanpropertyName - the property name
public int getIntProperty(java.lang.Object bean,
java.lang.String propertyName)
bean - the beanpropertyName - the property name
public java.util.Collection<java.lang.Object> values(java.lang.Object bean)
throws java.lang.Exception
bean - the bean
java.lang.Exception - if a property cannot be accessed.
public void copy(java.lang.Object bean,
java.lang.Object copy)
throws java.lang.Exception
bean - the source bean.copy - the target bean.
java.lang.Exception - if a property could not be accessed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||