|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MethodInvocationResult
Captures the result of invoking a method.
| Method Summary | ||
|---|---|---|
java.lang.Object |
getReturnValue()
The return value from the method invocation. |
|
|
getThrown(java.lang.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. |
|
| Method Detail |
|---|
java.lang.Object getReturnValue()
boolean isFail()
void rethrow()
getReturnValue().
<T extends java.lang.Throwable> T getThrown(java.lang.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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||