Class Acme.GenericCloneable

java.lang.Object
|
+----Acme.GenericCloneable

public class GenericCloneable

extends Object

implements Cloneable

A convenience parent for Cloneable classes.

In the current JDK, the API for cloning is slightly broken. The intent
was for classes that didn't need to clone any sub-objects to be able to
just add an "implements Cloneable" and have everything work. However,
as it stands now, such classes still need to implement a clone method.

What's annoying is that all of these no-sub-objects clone methods are
completely identical. Every one of them looks like this:

Well, what this class does is implement that clone method. If your
class doesn't need to have anything else as parent (true for "struct"
classes), then just make GenericCloneable the parent and presto, you're
cloneable.