public class BeanMapper extends Object
Constructor and Description |
---|
BeanMapper(Configuration configuration) |
Modifier and Type | Method and Description |
---|---|
BeanMapperBuilder |
clear() |
BeanMapperBuilder |
config() |
Configuration |
getConfiguration() |
<S,T> Collection<T> |
map(Collection<S> sourceItems,
Class<T> targetClass)
Maps a list of source items to a list of target items with a specific class
|
<S,T> Collection<T> |
map(Collection<S> sourceItems,
Class<T> targetClass,
Class<? extends Collection> collectionClass)
Maps a list of source items to a list of target items with a specific class
|
Object |
map(Object source) |
<S,T> T |
map(S source,
Class<T> targetClass)
Copies the values from the source object to a newly constructed target instance
|
<S,T> T |
map(S source,
Class<T> targetClass,
BeanInitializer beanInitializer,
boolean converterChoosable)
Copies the values from the source object to a newly constructed target instance
|
<S,T> T |
map(S source,
Class<T> targetClass,
boolean converterChoosable)
Copies the values from the source object to a newly constructed target instance
|
<S,T> T |
map(S source,
T target)
Copies the values from the source object to an existing target instance
|
BeanMapperBuilder |
wrapConfig() |
public BeanMapper(Configuration configuration)
public <S,T> T map(S source, Class<T> targetClass)
S
- The instance from which the properties get copiedT
- the instance to which the properties get copiedsource
- source instance of the propertiestargetClass
- class of the target, needs to be constructed as the target instancepublic <S,T> T map(S source, Class<T> targetClass, boolean converterChoosable)
S
- The instance from which the properties get copiedT
- the instance to which the properties get copiedsource
- source instance of the propertiestargetClass
- class of the target, needs to be constructed as the target instanceconverterChoosable
- when true
a plain conversion is checked before mappingpublic <S,T> T map(S source, Class<T> targetClass, BeanInitializer beanInitializer, boolean converterChoosable)
S
- The instance from which the properties get copiedT
- the instance to which the properties get copiedsource
- source instance of the propertiestargetClass
- class of the target, needs to be constructed as the target instancebeanInitializer
- initializes the beansconverterChoosable
- when true
a plain conversion is checked before mappingpublic <S,T> Collection<T> map(Collection<S> sourceItems, Class<T> targetClass)
S
- the instance from which the properties get copied.T
- the instance to which the properties get copiedsourceItems
- the items to be mappedtargetClass
- the class type of the items in the returned listpublic <S,T> Collection<T> map(Collection<S> sourceItems, Class<T> targetClass, Class<? extends Collection> collectionClass)
S
- the instance from which the properties get copied.T
- the instance to which the properties get copiedsourceItems
- the items to be mappedtargetClass
- the class type of the items in the returned listcollectionClass
- the collection classpublic <S,T> T map(S source, T target)
S
- the instance from which the properties get copied.T
- the instance to which the properties get copiedsource
- source instance of the propertiestarget
- target instance for the propertiespublic final Configuration getConfiguration()
public BeanMapperBuilder clear()
public BeanMapperBuilder config()
public BeanMapperBuilder wrapConfig()
Copyright © 2015–2017 42 BV. All rights reserved.