Class SerializableCloner
java.lang.Object
com.comphenix.protocol.reflect.cloning.SerializableCloner
- All Implemented Interfaces:
Cloner
Represents a cloner that can clone any class that implements Serializable.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
SerializableCloner
public SerializableCloner()
-
-
Method Details
-
canClone
Description copied from interface:ClonerDetermine whether the current cloner can clone the given object. -
clone
Description copied from interface:ClonerPerform the clone.This method should never be called unless a corresponding
Cloner.canClone(Object)returns TRUE. -
clone
Clone the given object using serialization.- Type Parameters:
T- Type- Parameters:
obj- - the object to clone.- Returns:
- The cloned object.
- Throws:
RuntimeException- If we were unable to clone the object.
-