diff options
Diffstat (limited to 'libjava/java/lang/CloneNotSupportedException.java')
-rw-r--r-- | libjava/java/lang/CloneNotSupportedException.java | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/libjava/java/lang/CloneNotSupportedException.java b/libjava/java/lang/CloneNotSupportedException.java index 128bd5bb33e..e13112ac350 100644 --- a/libjava/java/lang/CloneNotSupportedException.java +++ b/libjava/java/lang/CloneNotSupportedException.java @@ -1,7 +1,5 @@ -/* CloneNotSupportedException.java -- exception thrown to indicate that - the object calling the clone method of Object does not implement the - Cloneable interface. - Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc. +/* CloneNotSupportedException.java -- thrown when an object cannot be cloned + Copyright (C) 1998, 1999, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -9,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -40,33 +38,38 @@ exception statement from your version. */ package java.lang; -/* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3 - * "The Java Language Specification", ISBN 0-201-63451-1 - * plus online API docs for JDK 1.2 beta from http://www.javasoft.com. - * Status: Believed complete and correct. - */ - /** * Thrown to indicate an object should not or could not be cloned. This * includes the case when {@link Object#clone()} is called on an object - * which does not implement the {@link Cloneable} interface. - * <p> + * which does not implement the {@link Cloneable} interface. For example:<br> + * <pre> + * void m() throws CloneNotSupportedException + * { + * clone(); + * } + * </pre> * - * Notice that calling <code>clone()</code> on an array will never produce + * <p>Notice that calling <code>clone()</code> on an array will never produce * this exception, as the VM will always succeed in copying the array, or - * cause an OutOfMemoryError first. + * cause an OutOfMemoryError first. For example:<br> + * <pre> + * void m(int[] array) + * { + * int[] copy = (int[]) array.clone(); + * } + * </pre> * * @author Brian Jones * @author Warren Levy <warrenl@cygnus.com> * @author Eric Blake <ebb9@email.byu.edu> - * @since 1.0 * @see Cloneable * @see Object#clone() + * @status updated to 1.4 */ public class CloneNotSupportedException extends Exception { /** - * compatible with JDK 1.0+ + * Compatible with JDK 1.0+. */ private static final long serialVersionUID = 5195511250079656443L; @@ -79,6 +82,7 @@ public class CloneNotSupportedException extends Exception /** * Create an exception with a message. + * * @param s the error message */ public CloneNotSupportedException(String s) |