FileDocCategorySizeDatePackage
InvocationTargetException.javaAPI DocAndroid 1.5 API2963Wed May 06 22:41:04 BST 2009java.lang.reflect

InvocationTargetException

public class InvocationTargetException extends Exception
This class provides a wrapper for an exception thrown by a {@code Method} or {@code Constructor} invocation.
see
Method#invoke
see
Constructor#newInstance
since
Android 1.0

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.

since
Android 1.0


                           
      
        super((Throwable) null);
    
public InvocationTargetException(Throwable exception)
Constructs a new {@code InvocationTargetException} instance with its cause / target exception filled in.

param
exception the exception which occurred while running the Method or Constructor
since
Android 1.0

        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.

param
detailMessage the detail message for the exception
param
exception the exception which occurred while running the Method or Constructor
since
Android 1.0

        super(detailMessage, exception);
        target = exception;
    
Methods Summary
public java.lang.ThrowablegetCause()
Returns the cause of this exception, which may be {@code null}.

return
the cause of this exception
since
Android 1.0

        return target;
    
public java.lang.ThrowablegetTargetException()
Returns the target exception, which may be {@code null}.

return
the target exception
since
Android 1.0

        return target;