public class BeanCopy extends BeanVisitor
BeanVisitor| Modifier and Type | Field and Description |
|---|---|
protected java.lang.Object |
destination |
declared, excludeNames, ignoreNullValues, includeNames, source| Constructor and Description |
|---|
BeanCopy(java.lang.Object source,
java.lang.Object destination) |
| Modifier and Type | Method and Description |
|---|---|
static BeanCopy |
beans(java.lang.Object source,
java.lang.Object destination)
Static factory.
|
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 |
exclude(java.lang.String... exclude)
Defines excluded property names.
|
BeanCopy |
ignoreNulls(boolean ignoreNulls)
Defines if
null values should be ignored. |
BeanCopy |
include(java.lang.String... include)
Defines included property names.
|
BeanCopy |
includeAs(java.lang.Class template)
Defines included property names as public properties
of given template class.
|
protected boolean |
visitProperty(java.lang.String name,
java.lang.Object value)
Copies single property to the destination.
|
getAllBeanGetterNames, resolveProperties, visitpublic static BeanCopy beans(java.lang.Object source, java.lang.Object destination)
public BeanCopy exclude(java.lang.String... exclude)
public BeanCopy include(java.lang.String... include)
public BeanCopy includeAs(java.lang.Class template)
public BeanCopy ignoreNulls(boolean ignoreNulls)
null values should be ignored.public BeanCopy declared(boolean declared)
true)
or only public (when set to false, default).public void copy()
protected boolean visitProperty(java.lang.String name,
java.lang.Object value)
visitProperty in class BeanVisitorCopyright © 2003-2013 Jodd Team