public class BeanCopy extends BeanVisitorImplBase<BeanCopy>
BeanCopy works with POJO beans, but also with Map.BeanVisitor| Modifier and Type | Field and Description |
|---|---|
protected BeanUtil |
beanUtil |
protected boolean |
declaredTarget |
protected java.lang.Object |
destination |
protected boolean |
forced |
protected boolean |
isTargetMap |
blacklist, declared, ignoreEmptyString, ignoreNullValues, includeFields, isSourceMap, rules, sourceWILDCARD_PATH_RULE_MATCHER, WILDCARD_RULE_MATCHER| Constructor and Description |
|---|
BeanCopy(java.lang.Object source,
java.lang.Object destination)
Creates new BeanCopy process between the source and the destination.
|
| Modifier and Type | Method and Description |
|---|---|
static BeanCopy |
beans(java.lang.Object source,
java.lang.Object destination)
Simple static factory for
BeanCopy. |
void |
copy()
Performs the copying.
|
BeanCopy |
declared(boolean declared)
Defines if all properties should be copied (when set to
true)
or only public (when set to false, default). |
BeanCopy |
declared(boolean declaredSource,
boolean declaredTarget)
Fine-tuning of the declared behaviour.
|
BeanCopy |
forced(boolean forced) |
static BeanCopy |
from(java.lang.Object source)
Defines source, detects a map.
|
static BeanCopy |
fromBean(java.lang.Object source)
Creates
BeanCopy with given POJO bean as a source. |
static BeanCopy |
fromMap(java.util.Map source)
Creates
BeanCopy with given Map as a source. |
BeanCopy |
to(java.lang.Object destination)
Defines destination, detects a map.
|
BeanCopy |
toBean(java.lang.Object destination)
Defines destination bean.
|
BeanCopy |
toMap(java.util.Map destination)
Defines destination map.
|
protected boolean |
visitProperty(java.lang.String name,
java.lang.Object value)
Copies single property to the destination.
|
_this, exclude, exclude, excludeAll, ignoreEmptyString, ignoreNulls, include, include, includeAs, includeFieldsaccept, getAllBeanPropertyNames, resolveProperties, visitprotected java.lang.Object destination
protected boolean forced
protected boolean declaredTarget
protected boolean isTargetMap
protected BeanUtil beanUtil
public BeanCopy(java.lang.Object source,
java.lang.Object destination)
Map.public static BeanCopy beans(java.lang.Object source, java.lang.Object destination)
BeanCopy.BeanCopy(Object, Object)public static BeanCopy fromBean(java.lang.Object source)
BeanCopy with given POJO bean as a source.public static BeanCopy fromMap(java.util.Map source)
BeanCopy with given Map as a source.public static BeanCopy from(java.lang.Object source)
public BeanCopy toBean(java.lang.Object destination)
public BeanCopy toMap(java.util.Map destination)
public BeanCopy to(java.lang.Object destination)
public BeanCopy declared(boolean declared)
true)
or only public (when set to false, default).declared in class BeanVisitorImplBase<BeanCopy>public BeanCopy declared(boolean declaredSource, boolean declaredTarget)
public BeanCopy forced(boolean forced)
public void copy()
protected boolean visitProperty(java.lang.String name,
java.lang.Object value)
visitProperty in class BeanVisitorCopyright © 2003-present Jodd Team