Package org.springframework.aop
Interface AfterReturningAdvice
- All Superinterfaces:
Advice
,AfterAdvice
- All Known Implementing Classes:
AspectJAfterReturningAdvice
After returning advice is invoked only on normal method return, not if an
exception is thrown. Such advice can see the return value, but cannot change it.
- Author:
- Rod Johnson
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
afterReturning
(Object returnValue, Method method, Object[] args, Object target) Callback after a given method successfully returned.
-
Method Details
-
afterReturning
void afterReturning(@Nullable Object returnValue, Method method, Object[] args, @Nullable Object target) throws Throwable Callback after a given method successfully returned.- Parameters:
returnValue
- the value returned by the method, if anymethod
- the method being invokedargs
- the arguments to the methodtarget
- the target of the method invocation. May benull
.- Throws:
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.
-