source: trunk/src/gcc/libjava/java/lang/CloneNotSupportedException.java@ 1389

Last change on this file since 1389 was 2, checked in by bird, 23 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 3.1 KB
Line 
1/* CloneNotSupportedException.java -- exception thrown to indicate that
2 the object calling the clone method of Object does not implement the
3 Cloneable interface.
4 Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc.
5
6This file is part of GNU Classpath.
7
8GNU Classpath is free software; you can redistribute it and/or modify
9it under the terms of the GNU General Public License as published by
10the Free Software Foundation; either version 2, or (at your option)
11any later version.
12
13GNU Classpath is distributed in the hope that it will be useful, but
14WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16General Public License for more details.
17
18You should have received a copy of the GNU General Public License
19along with GNU Classpath; see the file COPYING. If not, write to the
20Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
2102111-1307 USA.
22
23Linking this library statically or dynamically with other modules is
24making a combined work based on this library. Thus, the terms and
25conditions of the GNU General Public License cover the whole
26combination.
27
28As a special exception, the copyright holders of this library give you
29permission to link this library with independent modules to produce an
30executable, regardless of the license terms of these independent
31modules, and to copy and distribute the resulting executable under
32terms of your choice, provided that you also meet, for each linked
33independent module, the terms and conditions of the license of that
34module. An independent module is a module which is not derived from
35or based on this library. If you modify this library, you may extend
36this exception to your version of the library, but you are not
37obligated to do so. If you do not wish to do so, delete this
38exception statement from your version. */
39
40
41package java.lang;
42
43/* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3
44 * "The Java Language Specification", ISBN 0-201-63451-1
45 * plus online API docs for JDK 1.2 beta from http://www.javasoft.com.
46 * Status: Believed complete and correct.
47 */
48
49/**
50 * Thrown to indicate an object should not or could not be cloned. This
51 * includes the case when {@link Object#clone()} is called on an object
52 * which does not implement the {@link Cloneable} interface.
53 * <p>
54 *
55 * Notice that calling <code>clone()</code> on an array will never produce
56 * this exception, as the VM will always succeed in copying the array, or
57 * cause an OutOfMemoryError first.
58 *
59 * @author Brian Jones
60 * @author Warren Levy <[email protected]>
61 * @author Eric Blake <[email protected]>
62 * @since 1.0
63 * @see Cloneable
64 * @see Object#clone()
65 */
66public class CloneNotSupportedException extends Exception
67{
68 /**
69 * compatible with JDK 1.0+
70 */
71 private static final long serialVersionUID = 5195511250079656443L;
72
73 /**
74 * Create an exception without a message.
75 */
76 public CloneNotSupportedException()
77 {
78 }
79
80 /**
81 * Create an exception with a message.
82 * @param s the error message
83 */
84 public CloneNotSupportedException(String s)
85 {
86 super(s);
87 }
88}
Note: See TracBrowser for help on using the repository browser.