Class FailureMethodInvocationResult
- java.lang.Object
-
- org.apache.tapestry5.internal.plastic.FailureMethodInvocationResult
-
- All Implemented Interfaces:
MethodInvocationResult
public class FailureMethodInvocationResult extends java.lang.Object implements MethodInvocationResult
-
-
Constructor Summary
Constructors Constructor Description FailureMethodInvocationResult(java.lang.Throwable thrown)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandidThrowCheckedException()Returns true if the method invocation threw a checked exception.<T extends java.lang.Throwable>
TgetCheckedException(java.lang.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.java.lang.ObjectgetReturnValue()Returns the actual value returned from the method invocation, if any.voidrethrow()If the invocation threw a checked exception, then this method throws that exception wrapped as the cause of a new RuntimeException.
-
-
-
Constructor Detail
-
FailureMethodInvocationResult
public FailureMethodInvocationResult(java.lang.Throwable thrown)
-
-
Method Detail
-
getReturnValue
public java.lang.Object getReturnValue()
Description copied from interface:MethodInvocationResultReturns the actual value returned from the method invocation, if any. This will be null if the invocation threw a checked exception, or the method itself is void.- Specified by:
getReturnValuein interfaceMethodInvocationResult
-
rethrow
public void rethrow()
Description copied from interface:MethodInvocationResultIf the invocation threw a checked exception, then this method throws that exception wrapped as the cause of a new RuntimeException. Otherwise, this method does nothing.- Specified by:
rethrowin interfaceMethodInvocationResult
-
didThrowCheckedException
public boolean didThrowCheckedException()
Description copied from interface:MethodInvocationResultReturns true if the method invocation threw a checked exception.- Specified by:
didThrowCheckedExceptionin interfaceMethodInvocationResult
-
getCheckedException
public <T extends java.lang.Throwable> T getCheckedException(java.lang.Class<T> exceptionType)
Description copied from interface:MethodInvocationResultRetrieves 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.- Specified by:
getCheckedExceptionin interfaceMethodInvocationResult
-
-