Package introspector.model
Class DeepCloner
java.lang.Object
introspector.model.DeepCloner
DeepCloner provides a method to create a deep copy of a Node tree.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final com.esotericsoftware.kryo.KryoThe Kryo object used to serialize and deserialize the objects to undertake deep cloning. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
kryo
private static final com.esotericsoftware.kryo.Kryo kryoThe Kryo object used to serialize and deserialize the objects to undertake deep cloning.
-
-
Constructor Details
-
DeepCloner
public DeepCloner()
-
-
Method Details
-
deepClone
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.
-