Back to index

plt-scheme  4.2.1
Public Member Functions | Static Private Attributes
java.lang.CloneNotSupportedException Class Reference

Thrown to indicate an object should not or could not be cloned. More...

Inheritance diagram for java.lang.CloneNotSupportedException:
Inheritance graph
[legend]
Collaboration diagram for java.lang.CloneNotSupportedException:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CloneNotSupportedException ()
 Create an exception without a message.
 CloneNotSupportedException (String s)
 Create an exception with a message.

Static Private Attributes

static final long serialVersionUID = 5195511250079656443L
 Compatible with JDK 1.0+.

Detailed Description

Thrown to indicate an object should not or could not be cloned.

This includes the case when Object#clone() is called on an object which does not implement the Cloneable interface. For example:

 void m() throws CloneNotSupportedException
 {
   clone();
 }
 

Notice that calling clone() on an array will never produce this exception, as the VM will always succeed in copying the array, or cause an OutOfMemoryError first. For example:

 void m(int[] array)
 {
   int[] copy = (int[]) array.clone();
 }
 
Author:
Brian Jones
Warren Levy warre.nosp@m.nl@c.nosp@m.ygnus.nosp@m..com
Eric Blake ebb9@.nosp@m.emai.nosp@m.l.byu.nosp@m..edu
See also:
Cloneable
Object::clone() updated to 1.4

Definition at line 69 of file CloneNotSupportedException.java.


Constructor & Destructor Documentation

Create an exception without a message.

Definition at line 79 of file CloneNotSupportedException.java.

  {
  }

Create an exception with a message.

Parameters:
sthe error message

Definition at line 88 of file CloneNotSupportedException.java.

  {
    super(s);
  }

Member Data Documentation

final long java.lang.CloneNotSupportedException.serialVersionUID = 5195511250079656443L [static, private]

Compatible with JDK 1.0+.

Reimplemented from java.lang.Exception.

Definition at line 74 of file CloneNotSupportedException.java.


The documentation for this class was generated from the following file: