BeanIO 2.0.4

org.beanio.internal.parser.accessor
Class FieldReflectionAccessor

java.lang.Object
  extended by org.beanio.internal.parser.accessor.PropertyAccessorSupport
      extended by org.beanio.internal.parser.accessor.FieldReflectionAccessor
All Implemented Interfaces:
PropertyAccessor

public class FieldReflectionAccessor
extends PropertyAccessorSupport
implements PropertyAccessor

A PropertyAccessor that uses reflection to access a public field.

Since:
2.0
Author:
Kevin Seim

Constructor Summary
FieldReflectionAccessor(Field field, int constructorArgumentIndex)
          Constructs a new FieldReflectionAccessor.
 
Method Summary
 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.
 
Methods inherited from class org.beanio.internal.parser.accessor.PropertyAccessorSupport
getConstructorArgumentIndex, isConstructorArgument, setConstructorArgumentIndex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.beanio.internal.parser.PropertyAccessor
getConstructorArgumentIndex, isConstructorArgument
 

Constructor Detail

FieldReflectionAccessor

public FieldReflectionAccessor(Field field,
                               int constructorArgumentIndex)
Constructs a new FieldReflectionAccessor.

Parameters:
field - the reflected Field
constructorArgumentIndex - the constructor argument index, or -1 if not a constructor argument
Method Detail

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 property
value - the property value

BeanIO 2.0.4

Copyright © 2010-2013 Kevin Seim