| Modifier and Type | Method and Description |
|---|---|
static <R,EX extends Throwable> |
invoke(Method method,
Object obj,
Object... args)
A wrapper for {@link Method#invoke(Object, Object...)
|
public static <R,EX extends Throwable> R invoke(Method method, @Nullable Object obj, Object... args) throws EX extends Throwable
method.invoke(obj,
args) that catches any exception, wraps it in an AssertionError, and throws that.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 ThrowableCopyright © 2021. All rights reserved.