
xy.reflect.ui.resource.jdk-apidocs.java.lang.Cloneable.html Maven / Gradle / Ivy
Show all versions of reflection-ui Show documentation
Cloneable (Java Platform SE 6)
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Java™ Platform
Standard Ed. 6
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
java.lang
Interface Cloneable
- All Known Subinterfaces:
- AclEntry, Attribute, AttributedCharacterIterator, Attributes, CertPathBuilderResult, CertPathParameters, CertPathValidatorResult, CertSelector, CertStoreParameters, CharacterIterator, CRLSelector, Descriptor, GSSCredential, Name
public interface Cloneable
A class implements the Cloneable
interface to
indicate to the Object.clone()
method that it
is legal for that method to make a
field-for-field copy of instances of that class.
Invoking Object's clone method on an instance that does not implement the
Cloneable
interface results in the exception
CloneNotSupportedException
being thrown.
By convention, classes that implement this interface should override
Object.clone (which is protected) with a public method.
See Object.clone()
for details on overriding this
method.
Note that this interface does not contain the clone method. Therefore, it is not possible to clone an object merely by virtue of the fact that it implements this interface. Even if the clone method is invoked reflectively, there is no guarantee that it will succeed.
- Since:
- JDK1.0
- See Also:
CloneNotSupportedException
,Object.clone()
|
Java™ Platform Standard Ed. 6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Submit a bug or feature
For further API reference and developer documentation, see Java SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2011, Oracle and/or its affiliates. All rights reserved.