|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--audiojury.domain.ObjectCloner
Makes deep copies of objects. Use this class to make a deep copies of complex objects.
Method Summary | |
static java.lang.Object |
deepCopy(java.lang.Object oldObj)
Static method for creating deep copies of objects. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static java.lang.Object deepCopy(java.lang.Object oldObj) throws java.lang.Exception
Simply give the object you want to copy as a parameter and it will deep copied. That is the all complex sub objects of the object (parameters and such) will also be recursively deep copied. This will make the copy unique and will cure any dangling references.
This is done by serializing and then deserializing the object. This will have the side effect that any transient sub objects from the origional object will be lost in the copy.
oldObj
- the object that will be copied.
java.lang.Exception
- if there was an unhandled exception while performing the operation.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |