FieldMapper<S,T>, Mapper<S,T>MapperImplpublic abstract class AbstractMapper<S,T> extends Object implements Mapper<S,T>
| Constructor | Description |
|---|---|
AbstractMapper(org.simpleflatmapper.reflect.BiInstantiator<? super S,MappingContext<? super S>,T> instantiator) |
| Modifier and Type | Method | Description |
|---|---|---|
protected void |
appendToStringBuilder(StringBuilder sb) |
|
T |
map(S source) |
map source object to a new newInstance of T
|
T |
map(S source,
MappingContext<? super S> mappingContext) |
|
protected abstract void |
mapFields(S source,
T target,
MappingContext<? super S> mappingContext) |
|
void |
mapTo(S source,
T target,
MappingContext<? super S> mappingContext) |
map source object to target object.
|
protected abstract void |
mapToFields(S source,
T target,
MappingContext<? super S> mappingContext) |
public AbstractMapper(org.simpleflatmapper.reflect.BiInstantiator<? super S,MappingContext<? super S>,T> instantiator)
public final T map(S source) throws MappingException
Mappermap in interface Mapper<S,T>source - object to map fromMappingException - if an exception occurspublic final T map(S source, MappingContext<? super S> mappingContext) throws MappingException
map in interface Mapper<S,T>MappingExceptionpublic final void mapTo(S source, T target, MappingContext<? super S> mappingContext) throws MappingException
FieldMappermapTo in interface FieldMapper<S,T>source - object to map fromtarget - object to map tomappingContext - the mapping contextMappingExceptionprotected abstract void mapFields(S source, T target, MappingContext<? super S> mappingContext) throws Exception
Exceptionprotected abstract void mapToFields(S source, T target, MappingContext<? super S> mappingContext) throws Exception
Exceptionprotected void appendToStringBuilder(StringBuilder sb)
Copyright © 2018. All rights reserved.