Back to index

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

Thrown when a class is requested by reflection, but the class definition cannot be found. More...

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

List of all members.

Public Member Functions

 ClassNotFoundException ()
 Create an exception without a message.
 ClassNotFoundException (String s)
 Create an exception with a message.
 ClassNotFoundException (String s, Throwable ex)
 Create an exception with a message and chain it to the exception which occurred while loading the class.
Throwable getException ()
 Returns the exception which occurred while loading the class, otherwise returns null.
Throwable getCause ()
 Returns the exception which occurred while loading the class, otherwise returns null.

Private Attributes

final Throwable ex
 The cause of this exception (duplicates the one stored in Throwable).

Static Private Attributes

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

Detailed Description

Thrown when a class is requested by reflection, but the class definition cannot be found.

This exception is often chained from another Throwable.

Author:
Brian Jones
Eric Blake ebb9@.nosp@m.emai.nosp@m.l.byu.nosp@m..edu
See also:
Class::forName(String)
ClassLoader::findSystemClass(String)
ClassLoader::loadClass(String, boolean) updated to 1.4

Definition at line 52 of file ClassNotFoundException.java.


Constructor & Destructor Documentation

Create an exception without a message.

Note that this initializes the cause to null.

Definition at line 71 of file ClassNotFoundException.java.

  {
    this(null, null);
  }

Create an exception with a message.

Note that this initializes the cause to null.

Parameters:
sthe message

Definition at line 82 of file ClassNotFoundException.java.

  {
    this(s, null);
  }
java.lang.ClassNotFoundException.ClassNotFoundException ( String  s,
Throwable  ex 
) [inline]

Create an exception with a message and chain it to the exception which occurred while loading the class.

Parameters:
sthe message
exthe chained exception
Since:
1.2

Definition at line 95 of file ClassNotFoundException.java.

  {
    super(s, ex);
    this.ex = ex;
  }

Member Function Documentation

Returns the exception which occurred while loading the class, otherwise returns null.

Returns:
the cause of this exception
Since:
1.4

Definition at line 121 of file ClassNotFoundException.java.

  {
    return ex;
  }

Returns the exception which occurred while loading the class, otherwise returns null.

This is a legacy method; the preferred choice now is Throwable#getCause().

Returns:
the cause of this exception
Since:
1.2

Definition at line 109 of file ClassNotFoundException.java.

  {
    return ex;
  }

Member Data Documentation

final Throwable java.lang.ClassNotFoundException.ex [private]

The cause of this exception (duplicates the one stored in Throwable).

the exception cause

Since:
1.2

Definition at line 65 of file ClassNotFoundException.java.

final long java.lang.ClassNotFoundException.serialVersionUID = 9176873029745254542L [static, private]

Compatible with JDK 1.0+.

Reimplemented from java.lang.Exception.

Definition at line 57 of file ClassNotFoundException.java.


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