Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/jcl/src/java.base/share/classes/java/lang/InstantiationException.java
12513 views
1
/*[INCLUDE-IF Sidecar16]*/
2
3
package java.lang;
4
5
/*******************************************************************************
6
* Copyright (c) 1998, 2014 IBM Corp. and others
7
*
8
* This program and the accompanying materials are made available under
9
* the terms of the Eclipse Public License 2.0 which accompanies this
10
* distribution and is available at https://www.eclipse.org/legal/epl-2.0/
11
* or the Apache License, Version 2.0 which accompanies this distribution and
12
* is available at https://www.apache.org/licenses/LICENSE-2.0.
13
*
14
* This Source Code may also be made available under the following
15
* Secondary Licenses when the conditions for such availability set
16
* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
17
* General Public License, version 2 with the GNU Classpath
18
* Exception [1] and GNU General Public License, version 2 with the
19
* OpenJDK Assembly Exception [2].
20
*
21
* [1] https://www.gnu.org/software/classpath/license.html
22
* [2] http://openjdk.java.net/legal/assembly-exception.html
23
*
24
* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
25
*******************************************************************************/
26
27
/**
28
* This exception is thrown when a program attempts
29
* to access a constructor which is not accessible
30
* from the location where the reference is made.
31
*
32
* @author OTI
33
* @version initial
34
*/
35
public class InstantiationException extends ReflectiveOperationException {
36
private static final long serialVersionUID = -8441929162975509110L;
37
38
/**
39
* Constructs a new instance of this class with its
40
* walkback filled in.
41
*
42
* @author OTI
43
* @version initial
44
*/
45
public InstantiationException () {
46
super();
47
}
48
/**
49
* Constructs a new instance of this class with its
50
* walkback and message filled in.
51
*
52
* @author OTI
53
* @version initial
54
*
55
* @param detailMessage String
56
* The detail message for the exception.
57
*/
58
public InstantiationException (String detailMessage) {
59
super(detailMessage);
60
}
61
62
/**
63
* Constructs a new instance of this class with its
64
* walkback and message filled in.
65
*
66
* @author OTI
67
* @version initial
68
*
69
* @param clazz Class
70
* The class which cannot be instantiated.
71
*/
72
InstantiationException (Class clazz) {
73
super(clazz.getName());
74
}
75
}
76
77