|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.telscenter.pas.util.PipedDeepCopy
public class PipedDeepCopy
Utility for making deep copies (vs. clone()'s shallow copies) of objects in a memory efficient way. Objects are serialized in the calling thread and de-serialized in another thread. Error checking is fairly minimal in this implementation. If an object is encountered that cannot be serialized (or that references an object that cannot be serialized) an error is printed to System.err and null is returned. Depending on your specific application, it might make more sense to have copy(...) re-throw the exception. http://javatechniques.com/public/java/docs/basics/low-memory-deep-copy.html
| Constructor Summary | |
|---|---|
PipedDeepCopy()
|
|
| Method Summary | |
|---|---|
static java.lang.Object |
copy(java.lang.Object orig)
Returns a copy of the object, or null if the object cannot be serialized. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PipedDeepCopy()
| Method Detail |
|---|
public static java.lang.Object copy(java.lang.Object orig)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||