org.beanio.internal.parser.accessor
Class MethodReflectionAccessor
java.lang.Object
org.beanio.internal.parser.accessor.PropertyAccessorSupport
org.beanio.internal.parser.accessor.MethodReflectionAccessor
- All Implemented Interfaces:
- PropertyAccessor
public class MethodReflectionAccessor
- extends PropertyAccessorSupport
- implements PropertyAccessor
A PropertyAccessor
that uses reflection to get and set a bean value.
- Since:
- 2.0
- Author:
- Kevin Seim
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MethodReflectionAccessor
public MethodReflectionAccessor(PropertyDescriptor descriptor,
int constructorArgumentIndex)
- Constructs a new ReflectionAccessor.
- Parameters:
descriptor
- the PropertyDescriptor describing the bean propertyconstructorArgumentIndex
- the constructor argument index, or -1 if not a constructor argument
getValue
public Object getValue(Object bean)
- Description copied from interface:
PropertyAccessor
- Returns the property value from a bean object.
- Specified by:
getValue
in interface PropertyAccessor
- Parameters:
bean
- the bean object to get the property from
- Returns:
- the property value
setValue
public void setValue(Object bean,
Object value)
- Description copied from interface:
PropertyAccessor
- Sets the property value on a bean object.
- Specified by:
setValue
in interface PropertyAccessor
- Parameters:
bean
- the bean object to set the propertyvalue
- the property value
Copyright © 2010-2013 Kevin Seim