Class GetterSetterPropertyDescriptor
- java.lang.Object
-
- com.github.dozermapper.core.propertydescriptor.AbstractPropertyDescriptor
-
- com.github.dozermapper.core.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.
-
-
Field Summary
Fields Modifier and Type Field Description protected BeanContainerbeanContainerprotected DestBeanCreatordestBeanCreator-
Fields inherited from class com.github.dozermapper.core.propertydescriptor.AbstractPropertyDescriptor
clazz, destDeepIndexHintContainer, fieldName, index, isIndexed, srcDeepIndexHintContainer
-
-
Constructor Summary
Constructors Constructor Description GetterSetterPropertyDescriptor(Class<?> clazz, String fieldName, boolean isIndexed, int index, HintContainer srcDeepIndexHintContainer, HintContainer destDeepIndexHintContainer, BeanContainer beanContainer, DestBeanCreator destBeanCreator)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Class<?>genericType()Determines generic parameter typeClass<?>getPropertyType()ObjectgetPropertyValue(Object bean)protected abstract MethodgetReadMethod()protected abstract StringgetSetMethodName()protected abstract MethodgetWriteMethod()Class<?>getWriteMethodPropertyType()protected ObjectinvokeReadMethod(Object target)protected voidinvokeWriteMethod(Object target, Object value)protected abstract booleanisCustomSetMethod()voidsetPropertyValue(Object bean, Object value, FieldMap fieldMap)protected voidwriteDeepDestinationValue(Object destObj, Object destFieldValue, FieldMap fieldMap)
-
-
-
Field Detail
-
beanContainer
protected final BeanContainer beanContainer
-
destBeanCreator
protected final DestBeanCreator destBeanCreator
-
-
Constructor Detail
-
GetterSetterPropertyDescriptor
public GetterSetterPropertyDescriptor(Class<?> clazz, String fieldName, boolean isIndexed, int index, HintContainer srcDeepIndexHintContainer, HintContainer destDeepIndexHintContainer, BeanContainer beanContainer, DestBeanCreator destBeanCreator)
-
-
Method Detail
-
getWriteMethod
protected 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()
-
getWriteMethodPropertyType
public Class<?> getWriteMethodPropertyType()
-
getPropertyType
public Class<?> getPropertyType()
-
writeDeepDestinationValue
protected void writeDeepDestinationValue(Object destObj, Object destFieldValue, FieldMap fieldMap)
-
genericType
public Class<?> genericType()
Description copied from interface:DozerPropertyDescriptorDetermines generic parameter type- Returns:
- For Type returns Parameter class, should return null if can't determine type
-
-