java.lang
Class TypeNotPresentException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by java.lang.TypeNotPresentException
All Implemented Interfaces:
Serializable

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, Serialized Form

Constructor Summary
TypeNotPresentException(String typeName, Throwable cause)
          Constructs a TypeNotPresentException for the supplied type.
 
Method Summary
 String typeName()
          Returns the name of the missing type.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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.