1/**
2 *
3 */
4package org.junit.internal.runners.model;
5
6import java.lang.reflect.InvocationTargetException;
7
8/**
9 * When invoked, throws the exception from the reflected method, rather than
10 * wrapping it in an InvocationTargetException.
11 */
12public abstract class ReflectiveCallable {
13	public Object run() throws Throwable {
14		try {
15			return runReflectiveCall();
16		} catch (InvocationTargetException e) {
17			throw e.getTargetException();
18		}
19	}
20
21	protected abstract Object runReflectiveCall() throws Throwable;
22}