An object of this class is thrown by Method.invoke() and Constructor.newInstance() when an exception is thrown by the method or constructor invoked through those methods. The InvocationTargetException class serves as a wrapper around the object that was thrown; that object can be retrieved with the getTargetException() method.
public class InvocationTargetException extends Exception { // Public Constructors public InvocationTargetException(Throwable target); public InvocationTargetException(Throwable target, String s); // Protected Constructor protected InvocationTargetException(); // Public Instance Methods public Throwable getTargetException(); }
Object->Throwable(Serializable)->Exception->InvocationTargetException
Constructor.newInstance(), Method.invoke()