Interface Cloner
- All Known Implementing Classes:
AggregateCloner,BukkitCloner,CollectionCloner,FieldCloner,GuavaOptionalCloner,ImmutableDetector,JavaOptionalCloner,NullableCloner,SerializableCloner
public interface Cloner
Represents an object that is capable of cloning other objects.
-
Method Summary
-
Method Details
-
canClone
Determine whether the current cloner can clone the given object.- Parameters:
source- - the object that is being considered.- Returns:
- TRUE if this cloner can actually clone the given object, FALSE otherwise.
-
clone
Perform the clone.This method should never be called unless a corresponding
canClone(Object)returns TRUE.- Parameters:
source- - the value to clone.- Returns:
- A cloned value.
- Throws:
IllegalArgumentException- If this cloner cannot perform the clone.
-