public abstract class ChainableMethodAdvice
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.Object |
nullResult |
| Constructor and Description |
|---|
ChainableMethodAdvice() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterReturning(AopMethodInvocation aopMethodInvocation,
java.lang.Object[] arguments,
java.lang.Object result) |
protected void |
afterThrowing(AopMethodInvocation aopMethodInvocation,
java.lang.Object[] arguments,
java.lang.Throwable throwable) |
protected java.lang.Object |
before(AopMethodInvocation aopMethodInvocation,
java.lang.Object[] arguments) |
abstract java.lang.Object |
createMethodContext(java.lang.Class<?> targetClass,
java.lang.reflect.Method method,
java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,java.lang.annotation.Annotation> annotations)
Creates the context to be used when invoking this advice.
|
protected void |
duringFinally(AopMethodInvocation aopMethodInvocation,
java.lang.Object[] arguments) |
java.lang.Object |
invoke(AopMethodInvocation aopMethodInvocation,
java.lang.Object[] arguments) |
public abstract java.lang.Object createMethodContext(java.lang.Class<?> targetClass,
java.lang.reflect.Method method,
java.util.Map<java.lang.Class<? extends java.lang.annotation.Annotation>,java.lang.annotation.Annotation> annotations)
null disables this advice for all
invocations on the target class and method. The context object can be
obtained by calling AopMethodInvocation.getAdviceMethodContext().
The context should be immutable as it is reused by concurrent calls to
invoke(AopMethodInvocation, Object[]).targetClass - the target class for the contextmethod - the method for the contextannotations - a map of the method's annotationsnull to disable this advice for the methodpublic java.lang.Object invoke(AopMethodInvocation aopMethodInvocation, java.lang.Object[] arguments) throws java.lang.Throwable
java.lang.Throwableprotected void afterReturning(AopMethodInvocation aopMethodInvocation, java.lang.Object[] arguments, java.lang.Object result) throws java.lang.Throwable
java.lang.Throwableprotected void afterThrowing(AopMethodInvocation aopMethodInvocation, java.lang.Object[] arguments, java.lang.Throwable throwable) throws java.lang.Throwable
java.lang.Throwableprotected java.lang.Object before(AopMethodInvocation aopMethodInvocation, java.lang.Object[] arguments) throws java.lang.Throwable
java.lang.Throwableprotected void duringFinally(AopMethodInvocation aopMethodInvocation, java.lang.Object[] arguments)