Class DeepCopy


  • public class DeepCopy
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      DeepCopy()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.Object simpleDeepCopy​(java.lang.Object object)
      Simple deep copy, that leverages Java Serialization.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DeepCopy

        public DeepCopy()
    • Method Detail

      • simpleDeepCopy

        public static java.lang.Object simpleDeepCopy​(java.lang.Object object)
        Simple deep copy, that leverages Java Serialization. Supplied object is serialized to an in memory buffer (byte array), and then a new object is reconstituted from that byte array. This is meant for copying small objects or object graphs, and will probably do nasty things if asked to copy a large graph.
        Parameters:
        object - object to deep copy
        Returns:
        deep copy of the object