1 /** 2 * 3 */ 4 package org.junit.internal.runners.model; 5 6 import 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 */ 12 public abstract class ReflectiveCallable { run()13 public Object run() throws Throwable { 14 try { 15 return runReflectiveCall(); 16 } catch (InvocationTargetException e) { 17 throw e.getTargetException(); 18 } 19 } 20 runReflectiveCall()21 protected abstract Object runReflectiveCall() throws Throwable; 22 }