public class MethodReflectionAccessor extends PropertyAccessorSupport implements PropertyAccessor
PropertyAccessor that uses reflection to get and set a bean value.| Constructor and Description |
|---|
MethodReflectionAccessor(PropertyDescriptor descriptor,
int constructorArgumentIndex)
Constructs a new ReflectionAccessor.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
getValue(Object bean)
Returns the property value from a bean object.
|
void |
setValue(Object bean,
Object value)
Sets the property value on a bean object.
|
getConstructorArgumentIndex, isConstructorArgument, setConstructorArgumentIndexclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetConstructorArgumentIndex, isConstructorArgumentpublic MethodReflectionAccessor(PropertyDescriptor descriptor, int constructorArgumentIndex)
descriptor - the PropertyDescriptor describing the bean propertyconstructorArgumentIndex - the constructor argument index, or -1 if not a constructor argumentpublic Object getValue(Object bean)
PropertyAccessorgetValue in interface PropertyAccessorbean - the bean object to get the property frompublic void setValue(Object bean, Object value)
PropertyAccessorsetValue in interface PropertyAccessorbean - the bean object to set the propertyvalue - the property value