to top
Android APIs
public class

ClassNotFoundException

extends Exception
java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ java.lang.ClassNotFoundException

Class Overview

Thrown when a class loader is unable to find a class.

Summary

Public Constructors
ClassNotFoundException()
Constructs a new ClassNotFoundException that includes the current stack trace.
ClassNotFoundException(String detailMessage)
Constructs a new ClassNotFoundException with the current stack trace and the specified detail message.
ClassNotFoundException(String detailMessage, Throwable exception)
Constructs a new ClassNotFoundException with the current stack trace, the specified detail message and the exception that occurred when loading the class.
Public Methods
Throwable getCause()
Returns the cause of this Throwable, or null if there is no cause.
Throwable getException()
Returns the exception which occurred when loading the class.
[Expand]
Inherited Methods
From class java.lang.Throwable
From class java.lang.Object

Public Constructors

public ClassNotFoundException ()

Added in API level 1

Constructs a new ClassNotFoundException that includes the current stack trace.

public ClassNotFoundException (String detailMessage)

Added in API level 1

Constructs a new ClassNotFoundException with the current stack trace and the specified detail message.

Parameters
detailMessage the detail message for this exception.

public ClassNotFoundException (String detailMessage, Throwable exception)

Added in API level 1

Constructs a new ClassNotFoundException with the current stack trace, the specified detail message and the exception that occurred when loading the class.

Parameters
detailMessage the detail message for this exception.
exception the exception which occurred while loading the class.

Public Methods

public Throwable getCause ()

Added in API level 1

Returns the cause of this Throwable, or null if there is no cause.

Returns
  • Throwable the receiver's cause.

public Throwable getException ()

Added in API level 1

Returns the exception which occurred when loading the class.

Returns
  • Throwable the exception which occurred while loading the class.