Package org.springframework.aop.aspectj

# Class AspectJAfterThrowingAdvice

java.lang.Object
org.springframework.aop.aspectj.AbstractAspectJAdvice
org.springframework.aop.aspectj.AspectJAfterThrowingAdvice

All Implemented Interfaces:
  `Serializable`, `Advice`, `Interceptor`, `MethodInterceptor`, `AfterAdvice`, `AspectJPrecedenceInformation`, `org.springframework.core.Ordered`

public class AspectJAfterThrowingAdvice extends AbstractAspectJAdvice implements MethodInterceptor, AfterAdvice, Serializable
Spring AOP advice wrapping an AspectJ after-throwing advice method.

Since:
  2.0
Author:
  Rod Johnson
See Also:
  - Serialized Form

## Field Summary

### Fields inherited from class org.springframework.aop.aspectj.AbstractAspectJAdvice

`aspectJAdviceMethod, JOIN_POINT_KEY`

### Fields inherited from interface org.springframework.core.Ordered

`HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE`

## Constructor Summary

Constructors
Constructor
Description
`AspectJAfterThrowingAdvice(Method aspectJBeforeAdviceMethod, AspectJExpressionPointcut pointcut, AspectInstanceFactory aif)`

## Method Summary

Modifier and Type
Method
Description
`Object`
`invoke(MethodInvocation mi)`
Implement this method to perform extra treatments before and after the invocation.
`boolean`
`isAfterAdvice()`
Return whether this is an after advice.
`boolean`
`isBeforeAdvice()`
Return whether this is a before advice.
`void`
`setThrowingName(String name)`

### Methods inherited from class org.springframework.aop.aspectj.AbstractAspectJAdvice

`argBinding, buildSafePointcut, calculateArgumentBindings, createParameterNameDiscoverer, currentJoinPoint, getAspectClassLoader, getAspectInstanceFactory, getAspectJAdviceMethod, getAspectName, getDeclarationOrder, getDiscoveredReturningGenericType, getDiscoveredReturningType, getDiscoveredThrowingType, getJoinPoint, getJoinPointMatch, getJoinPointMatch, getOrder, getPointcut, invokeAdviceMethod, invokeAdviceMethod, invokeAdviceMethodWithGivenArgs, setArgumentNames, setArgumentNamesFromStringArray, setAspectName, setDeclarationOrder, setReturningName, setReturningNameNoCheck, setThrowingNameNoCheck, supportsProceedingJoinPoint, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### AspectJAfterThrowingAdvice

public AspectJAfterThrowingAdvice(Method aspectJBeforeAdviceMethod, AspectJExpressionPointcut pointcut, AspectInstanceFactory aif)

## Method Details

### isBeforeAdvice

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

Specified by:
  `isBeforeAdvice` in interface `AspectJPrecedenceInformation`

### isAfterAdvice

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

Specified by:
  `isAfterAdvice` in interface `AspectJPrecedenceInformation`

### setThrowingName

public void setThrowingName(String name)

Overrides:
  `setThrowingName` in class `AbstractAspectJAdvice`

### invoke

@Nullable public Object invoke(MethodInvocation mi) throws Throwable
Description copied from interface: `MethodInterceptor`
Implement this method to perform extra treatments before and after the invocation. Polite implementations would certainly like to invoke `Joinpoint.proceed()`.

Specified by:
  `invoke` in interface `MethodInterceptor`
Parameters:
  `mi` - the method invocation joinpoint
Returns:
  the result of the call to `Joinpoint.proceed()`; might be intercepted by the interceptor
Throws:
  `Throwable` - if the interceptors or the target object throws an exception