Class DeepCloner

java.lang.Object
introspector.model.DeepCloner

public class DeepCloner extends Object
DeepCloner provides a method to create a deep copy of a Node tree.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final com.esotericsoftware.kryo.Kryo
    The Kryo object used to serialize and deserialize the objects to undertake deep cloning.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Node
    deepClone(Node original)
    Deep clones a Node tree.
    static <T> T
    deepClone(T original)
    Deep clones an object.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • kryo

      private static final com.esotericsoftware.kryo.Kryo kryo
      The Kryo object used to serialize and deserialize the objects to undertake deep cloning.
  • Constructor Details

    • DeepCloner

      public DeepCloner()
  • Method Details

    • deepClone

      public static Node deepClone(Node original)
      Deep clones a Node tree.
      Parameters:
      original - the original Node tree.
      Returns:
      a deep copy of the original Node tree.
    • deepClone

      public static <T> T deepClone(T original)
      Deep clones an object.
      Type Parameters:
      T - the type of the object.
      Parameters:
      original - the original object.
      Returns:
      a deep copy of the original object.