public class InvocationTargetException extends ReflectiveOperationException
Method or
Constructor invocation.| Modifier | Constructor and Description |
|---|---|
protected |
InvocationTargetException()
Constructs a new
InvocationTargetException instance with a
null cause / target exception. |
|
InvocationTargetException(Throwable exception)
Constructs a new
InvocationTargetException instance with its
cause / target exception filled in. |
|
InvocationTargetException(Throwable exception,
String detailMessage)
Constructs a new
InvocationTargetException instance with its
cause / target exception and message filled in. |
| Modifier and Type | Method and Description |
|---|---|
Throwable |
getCause()
Returns the cause of this exception, which may be
null. |
Throwable |
getTargetException()
Returns the target exception, which may be
null. |
addSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringprotected InvocationTargetException()
InvocationTargetException instance with a
null cause / target exception.public InvocationTargetException(Throwable exception)
InvocationTargetException instance with its
cause / target exception filled in.exception - the exception which occurred while running the Method or
Constructorpublic InvocationTargetException(Throwable exception, String detailMessage)
InvocationTargetException instance with its
cause / target exception and message filled in.detailMessage - the detail message for the exceptionexception - the exception which occurred while running the Method or
Constructorpublic Throwable getTargetException()
null.