src/share/classes/java/lang/InstantiationException.java

Print this page
rev 10048 : 8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
Reviewed-by:


  23  * questions.
  24  */
  25 
  26 package java.lang;
  27 
  28 /**
  29  * Thrown when an application tries to create an instance of a class
  30  * using the {@code newInstance} method in class
  31  * {@code Class}, but the specified class object cannot be
  32  * instantiated.  The instantiation can fail for a variety of
  33  * reasons including but not limited to:
  34  *
  35  * <ul>
  36  * <li> the class object represents an abstract class, an interface,
  37  *      an array class, a primitive type, or {@code void}
  38  * <li> the class has no nullary constructor
  39  *</ul>
  40  *
  41  * @author  unascribed
  42  * @see     java.lang.Class#newInstance()
  43  * @since   JDK1.0
  44  */
  45 public
  46 class InstantiationException extends ReflectiveOperationException {
  47     private static final long serialVersionUID = -8441929162975509110L;
  48 
  49     /**
  50      * Constructs an {@code InstantiationException} with no detail message.
  51      */
  52     public InstantiationException() {
  53         super();
  54     }
  55 
  56     /**
  57      * Constructs an {@code InstantiationException} with the
  58      * specified detail message.
  59      *
  60      * @param   s   the detail message.
  61      */
  62     public InstantiationException(String s) {
  63         super(s);


  23  * questions.
  24  */
  25 
  26 package java.lang;
  27 
  28 /**
  29  * Thrown when an application tries to create an instance of a class
  30  * using the {@code newInstance} method in class
  31  * {@code Class}, but the specified class object cannot be
  32  * instantiated.  The instantiation can fail for a variety of
  33  * reasons including but not limited to:
  34  *
  35  * <ul>
  36  * <li> the class object represents an abstract class, an interface,
  37  *      an array class, a primitive type, or {@code void}
  38  * <li> the class has no nullary constructor
  39  *</ul>
  40  *
  41  * @author  unascribed
  42  * @see     java.lang.Class#newInstance()
  43  * @since   1.0
  44  */
  45 public
  46 class InstantiationException extends ReflectiveOperationException {
  47     private static final long serialVersionUID = -8441929162975509110L;
  48 
  49     /**
  50      * Constructs an {@code InstantiationException} with no detail message.
  51      */
  52     public InstantiationException() {
  53         super();
  54     }
  55 
  56     /**
  57      * Constructs an {@code InstantiationException} with the
  58      * specified detail message.
  59      *
  60      * @param   s   the detail message.
  61      */
  62     public InstantiationException(String s) {
  63         super(s);