| Access | Constructor and Description |
|---|---|
| public | AspectJAfterReturningAdvice(Method aspectJBeforeAdviceMethod, AspectJExpressionPointcut pointcut, AspectInstanceFactory aif)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | afterReturning(Object
the value returned by the method, if any returnValue, Method the method being invoked method, Object[] the arguments to the method args, Object the target of the method invocation. May be target)null.Implements org. |
| public boolean | isAfterAdvice()
Implements org. |
| public boolean | isBeforeAdvice()
Implements org. |
| private boolean | Returns: whether to invoke the advice method for the given return value and typethe type of argument declared in advice method type, Method the advice method method, Object the return value of the target method returnValue)Following AspectJ semantics, if a return value is null (or return type is void), then the return type of target method should be used to determine whether advice is invoked or not. |
| public void | |
| private boolean | Returns: whether to invoke the advice method for the given return valuethe return value of the target method returnValue)Following AspectJ semantics, if a returning clause was specified, then the advice is only invoked if the returned value is an instance of the given returning type and generic type parameters, if any, match the assignment rules. |
| AspectJAfterReturningAdvice | back to summary |
|---|---|
| public AspectJAfterReturningAdvice(Method aspectJBeforeAdviceMethod, AspectJExpressionPointcut pointcut, AspectInstanceFactory aif) | |
| afterReturning | back to summary |
|---|---|
| public void afterReturning(Object returnValue, Method method, Object[] args, Object target) throws Throwable Implements org. Doc from org. Callback after a given method successfully returned.
| |
| isAfterAdvice | back to summary |
|---|---|
| public boolean isAfterAdvice() Implements org. Doc from org. Return whether this is an after advice.
| |
| isBeforeAdvice | back to summary |
|---|---|
| public boolean isBeforeAdvice() Implements org. Doc from org. Return whether this is a before advice.
| |
| matchesReturnValue | back to summary |
|---|---|
| private boolean matchesReturnValue(Class<?> type, Method method, Object returnValue) Following AspectJ semantics, if a return value is null (or return type is void), then the return type of target method should be used to determine whether advice is invoked or not. Also, even if the return type is void, if the type of argument declared in the advice method is Object, then the advice must still get invoked. | |
| setReturningName | back to summary |
|---|---|
| public void setReturningName(String name) Overrides org.
| |
| shouldInvokeOnReturnValueOf | back to summary |
|---|---|
| private boolean shouldInvokeOnReturnValueOf(Method method, Object returnValue) Following AspectJ semantics, if a returning clause was specified, then the advice is only invoked if the returned value is an instance of the given returning type and generic type parameters, if any, match the assignment rules. If the returning type is Object, the advice is *always* invoked.
| |