org.dozer.propertydescriptor
Class GetterSetterPropertyDescriptor

java.lang.Object
  extended by org.dozer.propertydescriptor.AbstractPropertyDescriptor
      extended by org.dozer.propertydescriptor.GetterSetterPropertyDescriptor
All Implemented Interfaces:
DozerPropertyDescriptor
Direct Known Subclasses:
JavaBeanPropertyDescriptor, MapPropertyDescriptor

public abstract class GetterSetterPropertyDescriptor
extends AbstractPropertyDescriptor

Internal class used to read and write values for fields that have a getter and setter method. This class encapsulates underlying dozer specific logic such as index mapping and deep mapping for reading and writing field values. Only intended for internal use.

Author:
garsombke.franz, tierney.matt, dmitry.buzdin

Field Summary
 
Fields inherited from class org.dozer.propertydescriptor.AbstractPropertyDescriptor
clazz, destDeepIndexHintContainer, fieldName, index, isIndexed, srcDeepIndexHintContainer
 
Constructor Summary
GetterSetterPropertyDescriptor(Class<?> clazz, String fieldName, boolean isIndexed, int index, HintContainer srcDeepIndexHintContainer, HintContainer destDeepIndexHintContainer)
           
 
Method Summary
 Class<?> genericType()
          Determines generic parameter type
 Class<?> getPropertyType()
           
 Object getPropertyValue(Object bean)
           
protected abstract  Method getReadMethod()
           
protected abstract  String getSetMethodName()
           
abstract  Method getWriteMethod()
           
protected  Object invokeReadMethod(Object target)
           
protected  void invokeWriteMethod(Object target, Object value)
           
protected abstract  boolean isCustomSetMethod()
           
 void setPropertyValue(Object bean, Object value, FieldMap fieldMap)
           
protected  void writeDeepDestinationValue(Object destObj, Object destFieldValue, FieldMap fieldMap)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GetterSetterPropertyDescriptor

public GetterSetterPropertyDescriptor(Class<?> clazz,
                                      String fieldName,
                                      boolean isIndexed,
                                      int index,
                                      HintContainer srcDeepIndexHintContainer,
                                      HintContainer destDeepIndexHintContainer)
Method Detail

getWriteMethod

public abstract Method getWriteMethod()
                               throws NoSuchMethodException
Throws:
NoSuchMethodException

getReadMethod

protected abstract Method getReadMethod()
                                 throws NoSuchMethodException
Throws:
NoSuchMethodException

getSetMethodName

protected abstract String getSetMethodName()
                                    throws NoSuchMethodException
Throws:
NoSuchMethodException

isCustomSetMethod

protected abstract boolean isCustomSetMethod()

getPropertyType

public Class<?> getPropertyType()

getPropertyValue

public Object getPropertyValue(Object bean)

setPropertyValue

public void setPropertyValue(Object bean,
                             Object value,
                             FieldMap fieldMap)

writeDeepDestinationValue

protected void writeDeepDestinationValue(Object destObj,
                                         Object destFieldValue,
                                         FieldMap fieldMap)

invokeReadMethod

protected Object invokeReadMethod(Object target)

invokeWriteMethod

protected void invokeWriteMethod(Object target,
                                 Object value)

genericType

public Class<?> genericType()
Description copied from interface: DozerPropertyDescriptor
Determines generic parameter type

Returns:
For Type returns Parameter class.


Copyright © 2005-2011 dozer. All Rights Reserved.