1. /*
  2. * @(#)Cloneable.java 1.14 03/01/23
  3. *
  4. * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package java.lang;
  8. /**
  9. * A class implements the <code>Cloneable</code> interface to
  10. * indicate to the {@link java.lang.Object#clone()} method that it
  11. * is legal for that method to make a
  12. * field-for-field copy of instances of that class.
  13. * <p>
  14. * Invoking Object's clone method on an instance that does not implement the
  15. * <code>Cloneable</code> interface results in the exception
  16. * <code>CloneNotSupportedException</code> being thrown.
  17. * <p>
  18. * By convention, classes that implement this interface should override
  19. * <tt>Object.clone</tt> (which is protected) with a public method.
  20. * See {@link java.lang.Object#clone()} for details on overriding this
  21. * method.
  22. * <p>
  23. * Note that this interface does <i>not</t> contain the <tt>clone</tt> method.
  24. * Therefore, it is not possible to clone an object merely by virtue of the
  25. * fact that it implements this interface. Even if the clone method is invoked
  26. * reflectively, there is no guarantee that it will succeed.
  27. *
  28. * @author unascribed
  29. * @version 1.14, 01/23/03
  30. * @see java.lang.CloneNotSupportedException
  31. * @see java.lang.Object#clone()
  32. * @since JDK1.0
  33. */
  34. public interface Cloneable {
  35. }