public class Cloner
extends java.lang.Object
Usage:
T clonedObject = (T)Cloner.deepClone( sourceObject );
"sourceObject" must implement serializable or externalizable.
| Modifier | Constructor and Description |
|---|---|
protected |
Cloner()
Allow overrides but not instantiation.
|
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Object |
deepClone(java.lang.Object sourceObject)
Deep clones an object using serialization/deserialization.
|
public static java.lang.Object deepClone(java.lang.Object sourceObject)
throws java.lang.Exception
sourceObject - The object to be cloned.
Must implement serializable or
externalizable.java.lang.Exception - if the clone process fails.