public class SuccessMethodInvocationResult extends java.lang.Object implements MethodInvocationResult
Constructor and Description |
---|
SuccessMethodInvocationResult(java.lang.Object returnValue) |
Modifier and Type | Method and Description |
---|---|
boolean |
didThrowCheckedException()
Returns true if the method invocation threw a checked exception.
|
<T extends java.lang.Throwable> |
getCheckedException(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.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.
|
public SuccessMethodInvocationResult(java.lang.Object returnValue)
public java.lang.Object getReturnValue()
MethodInvocationResult
getReturnValue
in interface MethodInvocationResult
public void rethrow()
MethodInvocationResult
rethrow
in interface MethodInvocationResult
public boolean didThrowCheckedException()
MethodInvocationResult
didThrowCheckedException
in interface MethodInvocationResult
public <T extends java.lang.Throwable> T getCheckedException(java.lang.Class<T> exceptionType)
MethodInvocationResult
getCheckedException
in interface MethodInvocationResult
${project.version} - Copyright © 2003-2015 The Apache Software Foundation.