Class Methods
java.lang.Object
org.codehaus.commons.compiler.util.reflect.Methods
Utility methods related to
Method
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <R,
EX extends Throwable>
RA wrapper formethod.invoke(obj, args)
that catches any exception, wraps it in anAssertionError
, and throws that.
-
Constructor Details
-
Methods
private Methods()
-
-
Method Details
-
invoke
public static <R,EX extends Throwable> R invoke(Method method, @Nullable Object obj, Object... args) throws EX 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
-