|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.yajul.util.PropertyAccessors
public class PropertyAccessors
Encapsulates the getter and setter meta-data for a given property.
Constructor Summary | |
---|---|
PropertyAccessors(BeanProperties beanProperties,
java.lang.String name)
Creates a new group of accessor methods for the given property name. |
Method Summary | |
---|---|
java.lang.reflect.Method |
getGetter()
Returns the getter method. |
java.lang.String |
getName()
Returns the name of the property. |
java.lang.reflect.Method |
getSetter()
Returns the setter method. |
java.lang.Class |
getType()
Returns the type of the property. |
java.lang.Object |
invokeGetter(java.lang.Object bean)
Invokes the getter on the specified object, returning the property value. |
java.lang.Object |
invokeSetter(java.lang.Object bean,
java.lang.Object value)
Invokes the setter on the given bean using the given value. |
java.lang.Object |
invokeSetter(java.lang.Object bean,
java.lang.Object value,
java.text.Format format)
Invokes the setter on the given bean using the given value. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PropertyAccessors(BeanProperties beanProperties, java.lang.String name)
name
- The property name.Method Detail |
---|
public java.lang.String getName()
public java.lang.Class getType()
public java.lang.reflect.Method getGetter()
public java.lang.reflect.Method getSetter()
public java.lang.Object invokeSetter(java.lang.Object bean, java.lang.Object value) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.NoSuchMethodException, java.text.ParseException
bean
- The bean to set the property on.value
- The new value of the property.
java.lang.IllegalAccessException
- if the setter cannot be accessed
java.lang.reflect.InvocationTargetException
- if the setter cannot be accessed
java.lang.NoSuchMethodException
- if the setter cannot be accessed
java.text.ParseException
- if the value needed to be parsed, and could not bepublic java.lang.Object invokeSetter(java.lang.Object bean, java.lang.Object value, java.text.Format format) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.NoSuchMethodException, java.text.ParseException
bean
- The bean to set the property on.value
- The new value of the property.format
- The format that will be used to convert the value into the property type.
java.lang.IllegalAccessException
- if the setter cannot be accessed
java.lang.reflect.InvocationTargetException
- if the setter cannot be accessed
java.lang.NoSuchMethodException
- if the setter cannot be accessed
java.text.ParseException
- if the value needed to be parsed, and could not bepublic java.lang.Object invokeGetter(java.lang.Object bean) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.NoSuchMethodException
bean
- The bean to invoke the getter on.
java.lang.IllegalAccessException
- if the getter cannot be accessed
java.lang.reflect.InvocationTargetException
- if the getter cannot be accessed
java.lang.NoSuchMethodException
- if the getter cannot be accessedpublic 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 |