Package java.lang
Class InstantiationException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.ReflectiveOperationException
-
- java.lang.InstantiationException
-
- All Implemented Interfaces:
Serializable
public class InstantiationException extends ReflectiveOperationException
Thrown when a program attempts to access a constructor which is not accessible from the location where the reference is made.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description InstantiationException()Constructs a newInstantiationExceptionthat includes the current stack trace.InstantiationException(String detailMessage)Constructs a newInstantiationExceptionwith the current stack trace and the specified detail message.
-
Method Summary
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
InstantiationException
public InstantiationException()
Constructs a newInstantiationExceptionthat includes the current stack trace.
-
InstantiationException
public InstantiationException(String detailMessage)
Constructs a newInstantiationExceptionwith the current stack trace and the specified detail message.- Parameters:
detailMessage- the detail message for this exception.
-
-