InvocationTargetExceptionpublic class InvocationTargetException extends Exception This class provides a wrapper for an exception thrown by a {@code Method} or
{@code Constructor} invocation. |
Fields Summary |
---|
private static final long | serialVersionUID | private Throwable | target |
Constructors Summary |
---|
protected InvocationTargetException()Constructs a new {@code InvocationTargetException} instance with a
{@code null} cause / target exception.
super((Throwable) null);
| public InvocationTargetException(Throwable exception)Constructs a new {@code InvocationTargetException} instance with its
cause / target exception filled in.
super(null, exception);
target = exception;
| public InvocationTargetException(Throwable exception, String detailMessage)Constructs a new {@code InvocationTargetException} instance with its
cause / target exception and message filled in.
super(detailMessage, exception);
target = exception;
|
Methods Summary |
---|
public java.lang.Throwable | getCause()Returns the cause of this exception, which may be {@code null}.
return target;
| public java.lang.Throwable | getTargetException()Returns the target exception, which may be {@code null}.
return target;
|
|