Class Methods
- java.lang.Object
-
- org.codehaus.commons.compiler.util.reflect.Methods
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <R,EX extends Throwable>
Rinvoke(Method method, Object obj, Object... args)
A wrapper formethod.invoke(obj, args)
that catches any exception, wraps it in anAssertionError
, and throws that.
-
-
-
Method Detail
-
invoke
public static <R,EX extends Throwable> R invoke(Method method, @Nullable Object obj, Object... args) throws EX extends Throwable
A wrapper formethod.invoke(obj, args)
that catches any exception, wraps it in anAssertionError
, and throws that.- Throws:
T
- The method threw that exceptionClassCastException
- The method threw an unchecked exception that is not a subclass of EXClassCastException
- The method returned a value that is not a subclass of REX extends Throwable
-
-