public interface MethodInvocationResult
Modifier and Type | Method and Description |
---|---|
Object |
getReturnValue()
The return value from the method invocation.
|
<T extends Throwable> |
getThrown(Class<T> throwableClass)
If
isFail() is true, this method provides access to the actual checked exception that was thrown. |
boolean |
isFail()
If true, then the method invocation ended with a checked exception being thrown.
|
void |
rethrow()
If the invocation threw a checked exception, this method will wrap that exception in a
RuntimeException and throw that.
|
Object getReturnValue()
boolean isFail()
void rethrow()
getReturnValue()
.<T extends Throwable> T getThrown(Class<T> throwableClass)
isFail()
is true, this method provides access to the actual checked exception that was thrown.throwableClass
- the type of exception to match${project.version} - Copyright © 2003-2015 The Apache Software Foundation.