jdk/src/java.base/share/classes/java/lang/TypeNotPresentException.java
changeset 32033 bf24e33c7919
parent 25859 3317bb8137f4
equal deleted inserted replaced
32032:22badc53802f 32033:bf24e33c7919
    27 
    27 
    28 /**
    28 /**
    29  * Thrown when an application tries to access a type using a string
    29  * Thrown when an application tries to access a type using a string
    30  * representing the type's name, but no definition for the type with
    30  * representing the type's name, but no definition for the type with
    31  * the specified name can be found.   This exception differs from
    31  * the specified name can be found.   This exception differs from
    32  * {@link ClassNotFoundException} in that <tt>ClassNotFoundException</tt> is a
    32  * {@link ClassNotFoundException} in that {@code ClassNotFoundException} is a
    33  * checked exception, whereas this exception is unchecked.
    33  * checked exception, whereas this exception is unchecked.
    34  *
    34  *
    35  * <p>Note that this exception may be used when undefined type variables
    35  * <p>Note that this exception may be used when undefined type variables
    36  * are accessed as well as when types (e.g., classes, interfaces or
    36  * are accessed as well as when types (e.g., classes, interfaces or
    37  * annotation types) are loaded.
    37  * annotation types) are loaded.
    47     private static final long serialVersionUID = -5101214195716534496L;
    47     private static final long serialVersionUID = -5101214195716534496L;
    48 
    48 
    49     private String typeName;
    49     private String typeName;
    50 
    50 
    51     /**
    51     /**
    52      * Constructs a <tt>TypeNotPresentException</tt> for the named type
    52      * Constructs a {@code TypeNotPresentException} for the named type
    53      * with the specified cause.
    53      * with the specified cause.
    54      *
    54      *
    55      * @param typeName the fully qualified name of the unavailable type
    55      * @param typeName the fully qualified name of the unavailable type
    56      * @param cause the exception that was thrown when the system attempted to
    56      * @param cause the exception that was thrown when the system attempted to
    57      *    load the named type, or <tt>null</tt> if unavailable or inapplicable
    57      *    load the named type, or {@code null} if unavailable or inapplicable
    58      */
    58      */
    59     public TypeNotPresentException(String typeName, Throwable cause) {
    59     public TypeNotPresentException(String typeName, Throwable cause) {
    60         super("Type " + typeName + " not present", cause);
    60         super("Type " + typeName + " not present", cause);
    61         this.typeName = typeName;
    61         this.typeName = typeName;
    62     }
    62     }