1 /* 2 * Copyright 2002-2007 the original author or authors. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package org.springframework.aop; 18 19 /** 20 * Tag interface for throws advice. 21 * 22 * <p>There are not any methods on this interface, as methods are invoked by 23 * reflection. Implementing classes must implement methods of the form:<br> 24 * 25 * <code>void afterThrowing([Method, args, target], ThrowableSubclass);</code> 26 * 27 * <p>Some examples of valid methods would be: 28 * 29 * <pre class="code">public void afterThrowing(Exception ex)</pre> 30 * <pre class="code">public void afterThrowing(RemoteException)</pre> 31 * <pre class="code">public void afterThrowing(Method method, Object[] args, Object target, Exception ex)</pre> 32 * <pre class="code">public void afterThrowing(Method method, Object[] args, Object target, ServletException ex)</pre> 33 * 34 * <p>The first three arguments are optional, and only useful if 35 * we want further information about the joinpoint, as in AspectJ 36 * <b>after throwing</b> advice. 37 * 38 * @author Rod Johnson 39 * @see AfterReturningAdvice 40 * @see MethodBeforeAdvice 41 */ 42 public interface ThrowsAdvice extends AfterAdvice { 43 44 } 45