Package jodd.bean
Class BeanCopy
java.lang.Object
jodd.bean.BeanCopy
Powerful tool for copying properties from one bean into another.
BeanCopy works with POJO beans, but also with Map.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate Objectprivate BiPredicate<String, Object> private booleanprivate booleanprivate booleanprivate final Object -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcopy()Performs the copying.declared(boolean declared) Defines if all properties should be copied (when set totrue) or only public (when set tofalse, default).filter(BiPredicate<String, Object> filter) forced(boolean forced) static BeanCopyCreatesBeanCopywith given POJO bean as a source.includeFields(boolean includeFields) Defines destination, detects a map.
-
Field Details
-
source
-
destination
-
forced
private boolean forced -
declared
private boolean declared -
isTargetMap
private boolean isTargetMap -
filter
-
filter2
-
includeFields
private boolean includeFields
-
-
Constructor Details
-
BeanCopy
Creates new BeanCopy process between the source and the destination. Both source and destination can be a POJO object or aMap. -
BeanCopy
-
-
Method Details
-
from
CreatesBeanCopywith given POJO bean as a source. -
to
Defines destination, detects a map. -
declared
Defines if all properties should be copied (when set totrue) or only public (when set tofalse, default). -
forced
-
filter
-
filter
-
includeFields
-
copy
public void copy()Performs the copying.
-