I can give you an unsatisfying answer: the "clarity needed" will not be available. :)
The problem is, here are the first two sentences of the documentation for java.lang.Object.clone()
:
Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object. (emphasis added)
So it's up to the author of the class.
If you read the further documentation on clone()
, it suggests that it should implement a deep copy (that copies all objects by value, rather than reference). For example:
Typically, this means copying any mutable objects that comprise the internal "deep structure" of the object being cloned and replacing the references to these objects with references to the copies.
But the default implementation of clone()
does not do this:
Otherwise, this method creates a new instance of the class of this object and initializes all its fields with exactly the contents of the corresponding fields of this object, as if by assignment; the contents of the fields are not themselves cloned. Thus, this method performs a "shallow copy" of this object, not a "deep copy" operation.
So it depends on the class, and how the author interpreted the above semantics (assuming the author understood them).