Source Home >> Java Source 1.6.0 >> java.lang.InstantiationException V 0.09
  • 01/*
  • 02 * @(#)InstantiationException.java 1.19 05/11/30
  • 03 *
  • 04 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
  • 05 * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  • 06 */
  • 07
  • 08package java.lang;
  • 09
  • 10/**
  • 11 * Thrown when an application tries to create an instance of a class
  • 12 * using the {@code newInstance} method in class
  • 13 * {@code Class}, but the specified class object cannot be
  • 14 * instantiated. The instantiation can fail for a variety of
  • 15 * reasons including but not limited to:
  • 16 *
  • 17 * <ul>
  • 18 * <li> the class object represents an abstract class, an interface,
  • 19 * an array class, a primitive type, or {@code void}
  • 20 * <li> the class has no nullary constructor
  • 21 *</ul>
  • 22 *
  • 23 * @author unascribed
  • 24 * @version 1.19, 11/30/05
  • 25 * @see java.lang.Class#newInstance()
  • 26 * @since JDK1.0
  • 27 */
  • 28public
  • 29class InstantiationException extends Exception {
  • 30 /**
  • 31 * Constructs an {@code InstantiationException} with no detail message.
  • 32 */
  • 33 public InstantiationException() {
  • 34 super();
  • 35 }
  • 36
  • 37 /**
  • 38 * Constructs an {@code InstantiationException} with the
  • 39 * specified detail message.
  • 40 *
  • 41 * @param s the detail message.
  • 42 */
  • 43 public InstantiationException(String s) {
  • 44 super(s);
  • 45 }
  • 46}

文件:InstantiationException.java
包名:java.lang
类名:InstantiationException
继承:Exception
接口: