org.dozer.propertydescriptor
Class MapPropertyDescriptor
java.lang.Object
org.dozer.propertydescriptor.AbstractPropertyDescriptor
org.dozer.propertydescriptor.GetterSetterPropertyDescriptor
org.dozer.propertydescriptor.MapPropertyDescriptor
- All Implemented Interfaces:
- DozerPropertyDescriptor
public class MapPropertyDescriptor
- extends GetterSetterPropertyDescriptor
Internal class used to read and write values for Map backed objects that use key/value pairs. The specified "key" is
used when invoking getter/setter. It is assumed that Map setter method has two parameters (for "key" and "value"),
but getter method one parameter (for "key").
Overloaded methods are supported. Map class can have two set methods with different signatures, but class will
choose the one with appropriate number of parameters.
Only intended for internal use.
- Author:
- garsombke.franz, tierney.matt, dmitry.buzdin
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MapPropertyDescriptor
public MapPropertyDescriptor(Class<?> clazz,
String fieldName,
boolean isIndexed,
int index,
String setMethod,
String getMethod,
String key,
HintContainer srcDeepIndexHintContainer,
HintContainer destDeepIndexHintContainer)
getWriteMethod
public Method getWriteMethod()
throws NoSuchMethodException
- Specified by:
getWriteMethod in class GetterSetterPropertyDescriptor
- Throws:
NoSuchMethodException
setPropertyValue
public void setPropertyValue(Object bean,
Object value,
FieldMap fieldMap)
- Specified by:
setPropertyValue in interface DozerPropertyDescriptor- Overrides:
setPropertyValue in class GetterSetterPropertyDescriptor
getReadMethod
protected Method getReadMethod()
throws NoSuchMethodException
- Specified by:
getReadMethod in class GetterSetterPropertyDescriptor
- Throws:
NoSuchMethodException
getSetMethodName
protected String getSetMethodName()
throws NoSuchMethodException
- Specified by:
getSetMethodName in class GetterSetterPropertyDescriptor
- Throws:
NoSuchMethodException
isCustomSetMethod
protected boolean isCustomSetMethod()
- Specified by:
isCustomSetMethod in class GetterSetterPropertyDescriptor
invokeWriteMethod
protected void invokeWriteMethod(Object target,
Object value)
- Overrides:
invokeWriteMethod in class GetterSetterPropertyDescriptor
invokeReadMethod
protected Object invokeReadMethod(Object target)
- Overrides:
invokeReadMethod in class GetterSetterPropertyDescriptor
Copyright © 2005-2011 dozer. All Rights Reserved.