Package net.binis.codegen.map.executor
Class MapperExecutor<T>
java.lang.Object
net.binis.codegen.map.executor.MapperExecutor<T>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static interfaceprotected static interfaceprotected static interfaceprotected static class -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMapperExecutor(Class<?> source, Class<T> destination, boolean convert, boolean producer, MappingStrategy strategy, Object key) MapperExecutor(Object source, T destination, boolean convert, boolean producer, MappingStrategy strategy, Object key) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddConverter(Map<String, MapperExecutor.TriFunction> accessors, Class<?> destination, Field getter, Field setter, String name) protected voidaddConverter(Map<String, MapperExecutor.TriFunction> accessors, Class<?> destination, Method getter, Method setter, String name) protected voidaddConverterWither(Map<String, MapperExecutor.TriFunction> accessors, Class<?> destination, Method getter, Method setter, String name) protected voidaddFieldMapping(Map<String, MapperExecutor.TriFunction> accessors, Class<?> destination, Field getter, Field setter, String name, MapperExecutor.TriFieldConsumer func) protected voidaddGetterSetterMapping(Map<String, MapperExecutor.TriFunction> accessors, Class<?> destination, Method getter, Method setter, String name, MapperExecutor.TriConsumer func) protected voidaddGetterWitherMapping(Map<String, MapperExecutor.TriFunction> accessors, Class<?> destination, Method getter, Method setter, String name, MapperExecutor.TriConsumer func) protected voidaddNullProtectedFieldMapping(Map<String, MapperExecutor.TriFunction> accessors, Class<?> destination, Field getter, Field setter, String name) protected voidaddNullProtectedGetterSetterMapping(Map<String, MapperExecutor.TriFunction> accessors, Class<?> destination, Method getter, Method setter, String name) protected voidaddNullProtectedGetterWitherMapping(Map<String, MapperExecutor.TriFunction> accessors, Class<?> destination, Method getter, Method setter, String name) protected voidaddPlainFieldMapping(Map<String, MapperExecutor.TriFunction> accessors, Class<?> destination, Field getter, Field setter, String name) protected voidaddPlainGetterSetterMapping(Map<String, MapperExecutor.TriFunction> accessors, Class<?> destination, Method getter, Method setter, String name) protected voidaddPlainGetterWitherMapping(Map<String, MapperExecutor.TriFunction> accessors, Class<?> destination, Method getter, Method setter, String name) protected voidaddWither(Map<String, MapperExecutor.TriFunction> accessors, Method wither) protected voidbuild()protected voidbuildConverter(HashMap<String, MapperExecutor.TriFunction> accessors) protected voidbuildMatcher(HashMap<String, MapperExecutor.TriFunction> accessors) protected voidbuildMatcherFields(HashMap<String, MapperExecutor.TriFunction> accessors) protected voidprotected voiddiscoverFields(Map<String, Field> fields, Class<?> cls) protected StringgetFieldName(String name) protected booleanisNonNullableToNullable(Class<?> srcType, Class<?> destType) protected booleanisNullableToNonNullable(Class<?> srcType, Class<?> destType) protected voidmatchGettersModifier(Map<String, MapperExecutor.TriFunction> accessors, Class<?> source, Class<?> destination) protected voidmatchGettersSetters(Map<String, MapperExecutor.TriFunction> accessors, Class<?> source, Class<?> destination) protected voidmatchGettersWithers(Map<String, MapperExecutor.TriFunction> accessors, Class<?> source, Class<?> destination) protected booleanprotected boolean
-
Field Details
-
mapper
-
source
-
destination
-
convert
protected final boolean convert -
producer
protected final boolean producer -
strategy
-
key
-
-
Constructor Details
-
MapperExecutor
public MapperExecutor(Object source, T destination, boolean convert, boolean producer, MappingStrategy strategy, Object key) -
MapperExecutor
public MapperExecutor(Class<?> source, Class<T> destination, boolean convert, boolean producer, MappingStrategy strategy, Object key)
-
-
Method Details
-
getSource
-
getDestination
- Specified by:
getDestinationin interfaceMapping<Object,T>
-
map
-
getStrategy
- Specified by:
getStrategyin interfaceMapping<Object,T>
-
build
protected void build() -
buildMatcher
-
discoverFields
-
buildMatcherFields
-
buildMatcherGettersSetters
-
buildConverter
-
matchGettersSetters
protected void matchGettersSetters(Map<String, MapperExecutor.TriFunction> accessors, Class<?> source, Class<?> destination) -
matchGettersWithers
protected void matchGettersWithers(Map<String, MapperExecutor.TriFunction> accessors, Class<?> source, Class<?> destination) -
matchGettersModifier
protected void matchGettersModifier(Map<String, MapperExecutor.TriFunction> accessors, Class<?> source, Class<?> destination) -
shouldNotSkip
-
shouldNotSkip
-
addConverter
-
addConverter
-
addConverterWither
-
addWither
-
isNonNullableToNullable
-
isNullableToNonNullable
-
addPlainGetterSetterMapping
-
addPlainFieldMapping
-
addPlainGetterWitherMapping
-
addNullProtectedGetterSetterMapping
-
addNullProtectedFieldMapping
-
addNullProtectedGetterWitherMapping
-
addGetterSetterMapping
protected void addGetterSetterMapping(Map<String, MapperExecutor.TriFunction> accessors, Class<?> destination, Method getter, Method setter, String name, MapperExecutor.TriConsumer func) -
addFieldMapping
protected void addFieldMapping(Map<String, MapperExecutor.TriFunction> accessors, Class<?> destination, Field getter, Field setter, String name, MapperExecutor.TriFieldConsumer func) -
addGetterWitherMapping
protected void addGetterWitherMapping(Map<String, MapperExecutor.TriFunction> accessors, Class<?> destination, Method getter, Method setter, String name, MapperExecutor.TriConsumer func) -
getFieldName
-