Package PamUtils

Class DeepCloner

java.lang.Object
PamUtils.DeepCloner

public class DeepCloner extends Object
  • Constructor Details

    • DeepCloner

      public DeepCloner()
  • Method Details

    • deepClone

      public static Object deepClone(Serializable objectToClone) throws CloneNotSupportedException
      Make a clone of the passed serializable object. Note that instead of using the clone method, this will serial/deserialize the object to make a deep copy. See this page: http://javatechniques.com/blog/faster-deep-copies-of-java-objects/ for complete details.
      Parameters:
      objectToClone - the object to clone. Must implement Serializable
      Returns:
      the cloned object
      Throws:
      CloneNotSupportedException