Skip to content

Commit d1dc669

Browse files
author
David R. MacIver
committed
add javadoc comment to SensibleClone
1 parent 6ccc3ce commit d1dc669

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/com/rabbitmq/utility/SensibleClone.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@
3030
//
3131
package com.rabbitmq.utility;
3232

33+
/**
34+
* This interface exists as a workaround for the annoyingness of java.lang.Cloneable.
35+
* It is used for generic methods which need to accept something they can actually clone
36+
* (Object.clone is protected and java.lang.Cloneable does not define a public clone method)
37+
* and want to provide some guarantees of the type of the cloned object.
38+
*/
3339
public interface SensibleClone<T extends SensibleClone<T>> extends Cloneable {
3440
public T sensibleClone();
3541
}

0 commit comments

Comments
 (0)