java.lang

Class TypeNotPresentException

public class TypeNotPresentException extends RuntimeException

Thrown when a type is accessed using a String-based representation, but no definition of the supplied type is found. This is effectively an unchecked equivalent of the existing ClassNotFound exception.

It may occur due to an attempt to load a missing class, interface or annotation, or when an undefined type variable is accessed.

Since: 1.5

See Also: ClassNotFoundException

Constructor Summary
TypeNotPresentException(String typeName, Throwable cause)
Constructs a TypeNotPresentException for the supplied type.
Method Summary
StringtypeName()
Returns the name of the missing type.

Constructor Detail

TypeNotPresentException

public TypeNotPresentException(String typeName, Throwable cause)
Constructs a TypeNotPresentException for the supplied type. The specified cause Throwable may be used to provide additional history, with regards to the root of the problem. It is perfectly valid for this to be null, if the cause of the problem is unknown.

Parameters: typeName the name of the missing type. cause the cause of this exception, or null if the cause is unknown.

Method Detail

typeName

public String typeName()
Returns the name of the missing type.

Returns: the missing type's name.