Path: blob/master/jcl/src/java.base/share/classes/java/lang/InstantiationException.java
12513 views
/*[INCLUDE-IF Sidecar16]*/12package java.lang;34/*******************************************************************************5* Copyright (c) 1998, 2014 IBM Corp. and others6*7* This program and the accompanying materials are made available under8* the terms of the Eclipse Public License 2.0 which accompanies this9* distribution and is available at https://www.eclipse.org/legal/epl-2.0/10* or the Apache License, Version 2.0 which accompanies this distribution and11* is available at https://www.apache.org/licenses/LICENSE-2.0.12*13* This Source Code may also be made available under the following14* Secondary Licenses when the conditions for such availability set15* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU16* General Public License, version 2 with the GNU Classpath17* Exception [1] and GNU General Public License, version 2 with the18* OpenJDK Assembly Exception [2].19*20* [1] https://www.gnu.org/software/classpath/license.html21* [2] http://openjdk.java.net/legal/assembly-exception.html22*23* 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-exception24*******************************************************************************/2526/**27* This exception is thrown when a program attempts28* to access a constructor which is not accessible29* from the location where the reference is made.30*31* @author OTI32* @version initial33*/34public class InstantiationException extends ReflectiveOperationException {35private static final long serialVersionUID = -8441929162975509110L;3637/**38* Constructs a new instance of this class with its39* walkback filled in.40*41* @author OTI42* @version initial43*/44public InstantiationException () {45super();46}47/**48* Constructs a new instance of this class with its49* walkback and message filled in.50*51* @author OTI52* @version initial53*54* @param detailMessage String55* The detail message for the exception.56*/57public InstantiationException (String detailMessage) {58super(detailMessage);59}6061/**62* Constructs a new instance of this class with its63* walkback and message filled in.64*65* @author OTI66* @version initial67*68* @param clazz Class69* The class which cannot be instantiated.70*/71InstantiationException (Class clazz) {72super(clazz.getName());73}74}757677