|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.googlecode.catchexception.throwable.internal.AbstractThrowableProcessingInvocationHandler<E>
E - The type of the throwable that is caught and ,optionally, verified.class AbstractThrowableProcessingInvocationHandler<E extends Throwable>
This abstract method invocation interceptor
| Field Summary | |
|---|---|
protected boolean |
assertThrowable
See AbstractThrowableProcessingInvocationHandler(Object, Class, boolean) . |
protected Class<E> |
clazz
See AbstractThrowableProcessingInvocationHandler(Object, Class, boolean) . |
protected Object |
target
See AbstractThrowableProcessingInvocationHandler(Object, Class, boolean) . |
| Constructor Summary | |
|---|---|
AbstractThrowableProcessingInvocationHandler(Object target,
Class<E> clazz,
boolean assertThrowable)
|
|
| Method Summary | |
|---|---|
protected Object |
afterInvocation(Object retval)
Must be called by the subclass after the method invocation that has not thrown a throwable. |
protected Object |
afterInvocationThrowsThrowable(Throwable e,
Method method)
Must be called by the subclass after the intercepted method invocation that has thrown a throwable. |
protected void |
beforeInvocation()
Must be called by the subclass before the intercepted method invocation. |
(package private) Object |
safeReturnValue(Class<?> type)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Class<E extends Throwable> clazz
AbstractThrowableProcessingInvocationHandler(Object, Class, boolean) .
protected Object target
AbstractThrowableProcessingInvocationHandler(Object, Class, boolean) .
protected boolean assertThrowable
AbstractThrowableProcessingInvocationHandler(Object, Class, boolean) .
| Constructor Detail |
|---|
public AbstractThrowableProcessingInvocationHandler(Object target,
Class<E> clazz,
boolean assertThrowable)
target - The object all method calls are delegated to. Must not be null.clazz - the type of the throwable that is to catch. Must not be null.assertThrowable - True if the interceptor shall throw an ThrowableNotThrownAssertionError if the method has not
thrown an throwable of the expected type.| Method Detail |
|---|
protected void beforeInvocation()
protected Object afterInvocation(Object retval)
throws Error
retval - The value returned by the intercepted method invocation.
Error - (optionally) Thrown if the verification failed.
protected Object afterInvocationThrowsThrowable(Throwable e,
Method method)
throws Error,
Throwable
e - the throwable thrown by the intercepted method invocation.method - the method that was proxied
Error - Thrown if the verification failed.
Throwable - The given throwable. (Re-)thrown if the thrown throwable shall not be caught and verification is not
required.Object safeReturnValue(Class<?> type)
type - a type
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||