BeanIO 2.0.4

org.beanio.internal.parser.accessor
Class MapAccessor

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

public class MapAccessor
extends Object
implements PropertyAccessor

A PropertyAccessor for getting and setting Map values.

Since:
2.0
Author:
Kevin Seim

Constructor Summary
MapAccessor(String key)
          Constructs a new MapAccessor.
 
Method Summary
 int getConstructorArgumentIndex()
          Returns the constructor argument index, or -1 if this property is not a constructor argument.
 Object getValue(Object bean)
          Returns the property value from a bean object.
 boolean isConstructorArgument()
          Returns whether this property is a constructor argument.
 void setValue(Object bean, Object value)
          Sets the property value on a bean object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapAccessor

public MapAccessor(String key)
Constructs a new MapAccessor.

Parameters:
key - the key used to get and set a value from a Map bean
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

isConstructorArgument

public boolean isConstructorArgument()
Description copied from interface: PropertyAccessor
Returns whether this property is a constructor argument.

Specified by:
isConstructorArgument in interface PropertyAccessor
Returns:
true if this property is a constructor argument, false otherwise

getConstructorArgumentIndex

public int getConstructorArgumentIndex()
Description copied from interface: PropertyAccessor
Returns the constructor argument index, or -1 if this property is not a constructor argument.

Specified by:
getConstructorArgumentIndex in interface PropertyAccessor
Returns:
the constructor argument index

BeanIO 2.0.4

Copyright © 2010-2013 Kevin Seim