Package com.rabbitmq.utility
Interface SensibleClone<T extends SensibleClone<T>>
-
- All Superinterfaces:
Cloneable
- All Known Implementing Classes:
AlreadyClosedException
,ConsumerCancelledException
,ShutdownSignalException
public interface SensibleClone<T extends SensibleClone<T>> extends Cloneable
This interface exists as a workaround for the annoyingness of java.lang.Cloneable. It is used for generic methods which need to accept something they can actually clone (Object.clone is protected and java.lang.Cloneable does not define a public clone method) and want to provide some guarantees of the type of the cloned object.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
sensibleClone()
Like Object.clone but sensible; in particular, public and declared to return the right type.
-
-
-
Method Detail
-
sensibleClone
T sensibleClone()
Like Object.clone but sensible; in particular, public and declared to return the right type.
-
-