|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tapestry5.internal.services.MethodInvocationFailResult
public class MethodInvocationFailResult
Implementation of MethodInvocationResult
for failed
invocations (where a checked exception was thrown).
Constructor Summary | |
---|---|
MethodInvocationFailResult(Throwable thrown)
|
Method Summary | ||
---|---|---|
Object |
getReturnValue()
The return value from the method invocation. |
|
|
getThrown(Class<T> throwableClass)
If MethodInvocationResult.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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MethodInvocationFailResult(Throwable thrown)
Method Detail |
---|
public Object getReturnValue()
MethodInvocationResult
getReturnValue
in interface MethodInvocationResult
public <T extends Throwable> T getThrown(Class<T> throwableClass)
MethodInvocationResult
MethodInvocationResult.isFail()
is true, this method provides access to the actual checked exception that was thrown.
getThrown
in interface MethodInvocationResult
throwableClass
- the type of exception to match
public boolean isFail()
MethodInvocationResult
isFail
in interface MethodInvocationResult
public void rethrow()
MethodInvocationResult
MethodInvocationResult.getReturnValue()
.
rethrow
in interface MethodInvocationResult
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |