21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package java.lang.reflect;
27
28 /**
29 * InvocationTargetException is a checked exception that wraps
30 * an exception thrown by an invoked method or constructor.
31 *
32 * <p>As of release 1.4, this exception has been retrofitted to conform to
33 * the general purpose exception-chaining mechanism. The "target exception"
34 * that is provided at construction time and accessed via the
35 * {@link #getTargetException()} method is now known as the <i>cause</i>,
36 * and may be accessed via the {@link Throwable#getCause()} method,
37 * as well as the aforementioned "legacy method."
38 *
39 * @see Method
40 * @see Constructor
41 */
42 public class InvocationTargetException extends ReflectiveOperationException {
43 /**
44 * Use serialVersionUID from JDK 1.1.X for interoperability
45 */
46 private static final long serialVersionUID = 4085088731926701167L;
47
48 /**
49 * This field holds the target if the
50 * InvocationTargetException(Throwable target) constructor was
51 * used to instantiate the object
52 *
53 * @serial
54 *
55 */
56 private Throwable target;
57
58 /**
59 * Constructs an {@code InvocationTargetException} with
60 * {@code null} as the target exception.
|
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package java.lang.reflect;
27
28 /**
29 * InvocationTargetException is a checked exception that wraps
30 * an exception thrown by an invoked method or constructor.
31 *
32 * <p>As of release 1.4, this exception has been retrofitted to conform to
33 * the general purpose exception-chaining mechanism. The "target exception"
34 * that is provided at construction time and accessed via the
35 * {@link #getTargetException()} method is now known as the <i>cause</i>,
36 * and may be accessed via the {@link Throwable#getCause()} method,
37 * as well as the aforementioned "legacy method."
38 *
39 * @see Method
40 * @see Constructor
41 * @since 1.1
42 */
43 public class InvocationTargetException extends ReflectiveOperationException {
44 /**
45 * Use serialVersionUID from JDK 1.1.X for interoperability
46 */
47 private static final long serialVersionUID = 4085088731926701167L;
48
49 /**
50 * This field holds the target if the
51 * InvocationTargetException(Throwable target) constructor was
52 * used to instantiate the object
53 *
54 * @serial
55 *
56 */
57 private Throwable target;
58
59 /**
60 * Constructs an {@code InvocationTargetException} with
61 * {@code null} as the target exception.
|