public interface MethodInvocationResult
Modifier and Type | Method and Description |
---|---|
boolean |
didThrowCheckedException()
Returns true if the method invocation threw a checked exception.
|
<T extends Throwable> |
getCheckedException(Class<T> exceptionType)
Retrieves the checked exception assignable to the indicated type, or null if
the invocation did not throw a checked exception or the thrown exception is not
assignable.
|
Object |
getReturnValue()
Returns the actual value returned from the method invocation, if any.
|
void |
rethrow()
If the invocation threw a checked exception, then this method throws that exception wrapped
as the cause of a new RuntimeException.
|
Object getReturnValue()
void rethrow()
boolean didThrowCheckedException()
<T extends Throwable> T getCheckedException(Class<T> exceptionType)
5.6.3 - Copyright © 2003-2021 The Apache Software Foundation.