Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tapestry5.plastic
Interface MethodInvocationResult

All Known Subinterfaces:
  MethodInvocation

All Known Implementing Classes:
  AbstractMethodInvocation, FailureMethodInvocationResult, SuccessMethodInvocationResult

    public interface MethodInvocationResult

The result of a method invocation, which encapsulates the actual return value (if any), as well as any checked exception.

Method Summary
`boolean` | `didThrowCheckedException()` Returns true if the method invocation threw a checked exception.
`
`<T extends java.lang.Throwable> T`
` | `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.

Method Detail

### getReturnValue

    java.lang.Object getReturnValue()

  Returns 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.

### rethrow

    void rethrow()

  If 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.

### didThrowCheckedException

    boolean didThrowCheckedException()

  Returns true if the method invocation threw a checked exception.

### getCheckedException

    <T extends java.lang.Throwable> T 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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2012 The Apache Software Foundation.