jaroslav@66
|
1 |
/*
|
jaroslav@66
|
2 |
* Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
|
jaroslav@66
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
jaroslav@66
|
4 |
*
|
jaroslav@66
|
5 |
* This code is free software; you can redistribute it and/or modify it
|
jaroslav@66
|
6 |
* under the terms of the GNU General Public License version 2 only, as
|
jaroslav@66
|
7 |
* published by the Free Software Foundation. Oracle designates this
|
jaroslav@66
|
8 |
* particular file as subject to the "Classpath" exception as provided
|
jaroslav@66
|
9 |
* by Oracle in the LICENSE file that accompanied this code.
|
jaroslav@66
|
10 |
*
|
jaroslav@66
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT
|
jaroslav@66
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
jaroslav@66
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
jaroslav@66
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that
|
jaroslav@66
|
15 |
* accompanied this code).
|
jaroslav@66
|
16 |
*
|
jaroslav@66
|
17 |
* You should have received a copy of the GNU General Public License version
|
jaroslav@66
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation,
|
jaroslav@66
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
jaroslav@66
|
20 |
*
|
jaroslav@66
|
21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
jaroslav@66
|
22 |
* or visit www.oracle.com if you need additional information or have any
|
jaroslav@66
|
23 |
* questions.
|
jaroslav@66
|
24 |
*/
|
jaroslav@66
|
25 |
|
jaroslav@66
|
26 |
package java.lang;
|
jaroslav@66
|
27 |
|
jaroslav@66
|
28 |
/**
|
jaroslav@66
|
29 |
* Thrown when an application tries to create an instance of a class
|
jaroslav@66
|
30 |
* using the {@code newInstance} method in class
|
jaroslav@66
|
31 |
* {@code Class}, but the specified class object cannot be
|
jaroslav@66
|
32 |
* instantiated. The instantiation can fail for a variety of
|
jaroslav@66
|
33 |
* reasons including but not limited to:
|
jaroslav@66
|
34 |
*
|
jaroslav@66
|
35 |
* <ul>
|
jaroslav@66
|
36 |
* <li> the class object represents an abstract class, an interface,
|
jaroslav@66
|
37 |
* an array class, a primitive type, or {@code void}
|
jaroslav@66
|
38 |
* <li> the class has no nullary constructor
|
jaroslav@66
|
39 |
*</ul>
|
jaroslav@66
|
40 |
*
|
jaroslav@66
|
41 |
* @author unascribed
|
jaroslav@66
|
42 |
* @see java.lang.Class#newInstance()
|
jaroslav@66
|
43 |
* @since JDK1.0
|
jaroslav@66
|
44 |
*/
|
jaroslav@66
|
45 |
public
|
jaroslav@66
|
46 |
class InstantiationException extends ReflectiveOperationException {
|
jaroslav@66
|
47 |
private static final long serialVersionUID = -8441929162975509110L;
|
jaroslav@66
|
48 |
|
jaroslav@66
|
49 |
/**
|
jaroslav@66
|
50 |
* Constructs an {@code InstantiationException} with no detail message.
|
jaroslav@66
|
51 |
*/
|
jaroslav@66
|
52 |
public InstantiationException() {
|
jaroslav@66
|
53 |
super();
|
jaroslav@66
|
54 |
}
|
jaroslav@66
|
55 |
|
jaroslav@66
|
56 |
/**
|
jaroslav@66
|
57 |
* Constructs an {@code InstantiationException} with the
|
jaroslav@66
|
58 |
* specified detail message.
|
jaroslav@66
|
59 |
*
|
jaroslav@66
|
60 |
* @param s the detail message.
|
jaroslav@66
|
61 |
*/
|
jaroslav@66
|
62 |
public InstantiationException(String s) {
|
jaroslav@66
|
63 |
super(s);
|
jaroslav@66
|
64 |
}
|
jaroslav@66
|
65 |
}
|