Top Description Fields Constructors Methods
org.springframework.aop.aspectj

public Class AspectJAfterThrowingAdvice

extends AbstractAspectJAdvice
implements MethodInterceptor, AfterAdvice, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, org.springframework.aop.AfterAdvice, org.aopalliance.aop.Advice, org.aopalliance.intercept.MethodInterceptor, org.aopalliance.intercept.Interceptor
Annotations
@SuppressWarnings:serial
Imports
java.io.Serializable, java.lang.reflect.Method, org.aopalliance.intercept.MethodInterceptor, .MethodInvocation, org.springframework.aop.AfterAdvice, org.springframework.lang.Nullable

Spring AOP advice wrapping an AspectJ after-throwing advice method.
Author
Rod Johnson
Since
2.0

Field Summary

Inherited from org.springframework.aop.aspectj.AbstractAspectJAdvice:
aspectJAdviceMethodJOIN_POINT_KEY

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Object
invoke(MethodInvocation
the method invocation joinpoint
mi
)

Implements org.aopalliance.intercept.MethodInterceptor.invoke.

Implement this method to perform extra treatments before and after the invocation.

public boolean
public boolean
public void
private boolean
shouldInvokeOnThrowing(Throwable ex)

In AspectJ semantics, after throwing advice that specifies a throwing clause is only invoked if the thrown exception is a subtype of the given throwing type.

Inherited from org.springframework.aop.aspectj.AbstractAspectJAdvice:
argBindingbuildSafePointcutcalculateArgumentBindingscreateParameterNameDiscoverercurrentJoinPointgetAspectClassLoadergetAspectInstanceFactorygetAspectJAdviceMethodgetAspectNamegetDeclarationOrdergetDiscoveredReturningGenericTypegetDiscoveredReturningTypegetDiscoveredThrowingTypegetJoinPointgetJoinPointMatchgetJoinPointMatchgetOrdergetPointcutinvokeAdviceMethodinvokeAdviceMethodinvokeAdviceMethodWithGivenArgssetArgumentNamessetArgumentNamesFromStringArraysetAspectNamesetDeclarationOrdersetReturningNamesetReturningNameNoChecksetThrowingNameNoChecksupportsProceedingJoinPointtoString

Constructor Detail

AspectJAfterThrowingAdviceback to summary
public AspectJAfterThrowingAdvice(Method aspectJBeforeAdviceMethod, AspectJExpressionPointcut pointcut, AspectInstanceFactory aif)

Method Detail

invokeback to summary
public Object invoke(MethodInvocation mi) throws Throwable

Implements org.aopalliance.intercept.MethodInterceptor.invoke.

Doc from org.aopalliance.intercept.MethodInterceptor.invoke.

Implement this method to perform extra treatments before and after the invocation. Polite implementations would certainly like to invoke Joinpoint#proceed().

Parameters
mi:MethodInvocation

the method invocation joinpoint

Returns:Object

the result of the call to Joinpoint#proceed(); might be intercepted by the interceptor

Annotations
@Override
@Nullable
Exceptions
Throwable:
if the interceptors or the target object throws an exception
isAfterAdviceback to summary
public boolean isAfterAdvice()

Implements org.springframework.aop.aspectj.AspectJPrecedenceInformation.isAfterAdvice.

Doc from org.springframework.aop.aspectj.AspectJPrecedenceInformation.isAfterAdvice.

Return whether this is an after advice.

Annotations
@Override
isBeforeAdviceback to summary
public boolean isBeforeAdvice()

Implements org.springframework.aop.aspectj.AspectJPrecedenceInformation.isBeforeAdvice.

Doc from org.springframework.aop.aspectj.AspectJPrecedenceInformation.isBeforeAdvice.

Return whether this is a before advice.

Annotations
@Override
setThrowingNameback to summary
public void setThrowingName(String name)

Overrides org.springframework.aop.aspectj.AbstractAspectJAdvice.setThrowingName.

Annotations
@Override
shouldInvokeOnThrowingback to summary
private boolean shouldInvokeOnThrowing(Throwable ex)

In AspectJ semantics, after throwing advice that specifies a throwing clause is only invoked if the thrown exception is a subtype of the given throwing type.