public class ObjectCloner
extends java.lang.Object
Constructor and Description |
---|
ObjectCloner() |
Modifier and Type | Method and Description |
---|---|
static void |
copyTo(java.lang.Object source,
java.lang.Object destination,
java.lang.Class<?> commonType)
Copy every field in object A to object B.
|
public static void copyTo(java.lang.Object source, java.lang.Object destination, java.lang.Class<?> commonType)
The two objects must have the same number of fields of the same type.
source
- - fields to copy.destination
- - fields to copy to.commonType
- - type containing each field to copy.