org.springframework.aop.framework.adapter

## 类 ThrowsAdviceInterceptor

- java.lang.Object
- - org.springframework.aop.framework.adapter.ThrowsAdviceInterceptor

- 所有已实现的接口:
    Advice, Interceptor, MethodInterceptor, AfterAdvice

      public class ThrowsAdviceInterceptor
      extends Object
      implements MethodInterceptor, AfterAdvice

  Interceptor to wrap an after-throwing advice.

  The signatures on handler methods on the `ThrowsAdvice` implementation method argument must be of the form:
  `void afterThrowing([Method, args, target], ThrowableSubclass);`

  Only the last argument is required.

  Some examples of valid methods would be:

      public void afterThrowing(Exception ex)

      public void afterThrowing(RemoteException)

      public void afterThrowing(Method method, Object[] args, Object target, Exception ex)

      public void afterThrowing(Method method, Object[] args, Object target, ServletException ex)

  This is a framework class that need not be used directly by Spring users.

  作者:
    Rod Johnson, Juergen Hoeller
  另请参阅:
    `MethodBeforeAdviceInterceptor`, `AfterReturningAdviceInterceptor`

- - ### 构造器概要

    构造器
    构造器和说明
    `ThrowsAdviceInterceptor(Object throwsAdvice)` Create a new ThrowsAdviceInterceptor for the given ThrowsAdvice.

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `int` | `getHandlerMethodCount()` Return the number of handler methods in this advice.
    `Object` | `invoke(MethodInvocation mi)` 方法实现说明

    - ### 从类继承的方法 java.lang.Object

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

- - ### 构造器详细资料

    - #### ThrowsAdviceInterceptor

          public ThrowsAdviceInterceptor(Object throwsAdvice)

      Create a new ThrowsAdviceInterceptor for the given ThrowsAdvice.
      参数:
        `throwsAdvice` - the advice object that defines the exception handler methods (usually a `ThrowsAdvice` implementation)

  - ### 方法详细资料

    - #### getHandlerMethodCount

          public int getHandlerMethodCount()

      Return the number of handler methods in this advice.

    - #### invoke

          public Object invoke(MethodInvocation mi)
                        throws Throwable

      从接口复制的说明: `MethodInterceptor`
      方法实现说明
      指定者:
        `invoke` 在接口中 `MethodInterceptor`
      参数:
        `mi` - 主要实现类:ReflectiveMethodInvocation
      抛出:
        `Throwable`