Package jodd.bean
Class BeanCopy
- java.lang.Object
-
- jodd.bean.BeanCopy
-
public class BeanCopy extends java.lang.ObjectPowerful tool for copying properties from one bean into another.BeanCopyworks with POJO beans, but also withMap.- See Also:
BeanVisitor
-
-
Constructor Summary
Constructors Constructor Description BeanCopy(java.lang.Object source, java.lang.Object destination)Creates new BeanCopy process between the source and the destination.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcopy()Performs the copying.BeanCopydeclared(boolean declared)Defines if all properties should be copied (when set totrue) or only public (when set tofalse, default).BeanCopyfilter(java.util.function.BiPredicate<java.lang.String,java.lang.Object> filter)BeanCopyfilter(java.util.function.Predicate<java.lang.String> filter)BeanCopyforced(boolean forced)static BeanCopyfrom(java.lang.Object source)CreatesBeanCopywith given POJO bean as a source.BeanCopyincludeFields(boolean includeFields)BeanCopyto(java.lang.Object destination)Defines destination, detects a map.
-
-
-
Method Detail
-
from
public static BeanCopy from(java.lang.Object source)
CreatesBeanCopywith given POJO bean as a source.
-
to
public BeanCopy to(java.lang.Object destination)
Defines destination, detects a map.
-
declared
public BeanCopy declared(boolean declared)
Defines if all properties should be copied (when set totrue) or only public (when set tofalse, default).
-
forced
public BeanCopy forced(boolean forced)
-
filter
public BeanCopy filter(java.util.function.Predicate<java.lang.String> filter)
-
filter
public BeanCopy filter(java.util.function.BiPredicate<java.lang.String,java.lang.Object> filter)
-
includeFields
public BeanCopy includeFields(boolean includeFields)
-
copy
public void copy()
Performs the copying.
-
-