Class Methods
- java.lang.Object
-
- org.codehaus.commons.compiler.util.reflect.Methods
-
public final class Methods extends java.lang.ObjectUtility methods related toMethod.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <R,EX extends java.lang.Throwable>
Rinvoke(java.lang.reflect.Method method, java.lang.Object obj, java.lang.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 java.lang.Throwable> R invoke(java.lang.reflect.Method method, @Nullable java.lang.Object obj, java.lang.Object... args) throws EX extends java.lang.ThrowableA wrapper formethod.invoke(obj, args)that catches any exception, wraps it in anAssertionError, and throws that.- Throws:
T- The method threw that exceptionjava.lang.ClassCastException- The method threw an unchecked exception that is not a subclass of EXjava.lang.ClassCastException- The method returned a value that is not a subclass of REX extends java.lang.Throwable
-
-