The Spring Framework

Class AspectJAfterReturningAdvice

  extended by org.springframework.aop.aspectj.AbstractAspectJAdvice
      extended by org.springframework.aop.aspectj.AspectJAfterReturningAdvice
All Implemented Interfaces:
Advice, AfterAdvice, AfterReturningAdvice, AspectJPrecedenceInformation, Ordered

public class AspectJAfterReturningAdvice
extends AbstractAspectJAdvice
implements AfterReturningAdvice, AfterAdvice

Spring AOP advice wrapping an AspectJ after-returning advice method.

Rod Johnson, Juergen Hoeller, Ramnivas Laddad

Field Summary
Fields inherited from class org.springframework.aop.aspectj.AbstractAspectJAdvice
aspectJAdviceMethod, JOIN_POINT_KEY
Fields inherited from interface org.springframework.core.Ordered
Constructor Summary
AspectJAfterReturningAdvice(Method aspectJBeforeAdviceMethod, AspectJExpressionPointcut pointcut, AspectInstanceFactory aif)
Method Summary
 void afterReturning(Object returnValue, Method method, Object[] args, Object target)
          Callback after a given method successfully returned.
 boolean isAfterAdvice()
          Return whether this is an after advice.
 boolean isBeforeAdvice()
          Return whether this is a before advice.
 void setReturningName(String name)
Methods inherited from class org.springframework.aop.aspectj.AbstractAspectJAdvice
argBinding, buildSafePointcut, calculateArgumentBindings, createParameterNameDiscoverer, currentJoinPoint, getAspectInstanceFactory, getAspectJAdviceMethod, getAspectName, getDeclarationOrder, getDiscoveredReturningGenericType, getDiscoveredReturningType, getDiscoveredThrowingType, getJoinPoint, getJoinPointMatch, getJoinPointMatch, getOrder, getPointcut, invokeAdviceMethod, invokeAdviceMethod, invokeAdviceMethodWithGivenArgs, setArgumentNames, setArgumentNamesFromStringArray, setAspectName, setDeclarationOrder, setReturningNameNoCheck, setThrowingName, setThrowingNameNoCheck, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail


public AspectJAfterReturningAdvice(Method aspectJBeforeAdviceMethod,
                                   AspectJExpressionPointcut pointcut,
                                   AspectInstanceFactory aif)
Method Detail


public boolean isBeforeAdvice()
Description copied from interface: AspectJPrecedenceInformation
Return whether this is a before advice.

Specified by:
isBeforeAdvice in interface AspectJPrecedenceInformation


public boolean isAfterAdvice()
Description copied from interface: AspectJPrecedenceInformation
Return whether this is an after advice.

Specified by:
isAfterAdvice in interface AspectJPrecedenceInformation


public void setReturningName(String name)
setReturningName in class AbstractAspectJAdvice


public void afterReturning(Object returnValue,
                           Method method,
                           Object[] args,
                           Object target)
                    throws Throwable
Description copied from interface: AfterReturningAdvice
Callback after a given method successfully returned.

Specified by:
afterReturning in interface AfterReturningAdvice
returnValue - the value returned by the method, if any
method - method being invoked
args - arguments to the method
target - target of the method invocation. May be null.
Throwable - if this object wishes to abort the call. Any exception thrown will be returned to the caller if it's allowed by the method signature. Otherwise the exception will be wrapped as a runtime exception.

The Spring Framework

Copyright © 2002-2007 The Spring Framework.