carbidecpp22devenv/plugins/org.eclipse.test.source_3.5.0.r20080925/src/org.junit4_4.5.0.v20090423/junitsrc/org/junit/internal/runners/model/ReflectiveCallable.java
author cawthron
Fri, 04 Dec 2009 11:49:54 -0600
changeset 636 3ef299ba838f
permissions -rw-r--r--
add files for RCL_2_2

/**
 * 
 */
package org.junit.internal.runners.model;

import java.lang.reflect.InvocationTargetException;

/**
 * When invoked, throws the exception from the reflected method, rather than
 * wrapping it in an InvocationTargetException.
 */
public abstract class ReflectiveCallable {
	public Object run() throws Throwable {
		try {
			return runReflectiveCall();
		} catch (InvocationTargetException e) {
			throw e.getTargetException();
		}
	}

	protected abstract Object runReflectiveCall() throws Throwable;
}