KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sapia > soto > aop > TestAroundAdvice


1 package org.sapia.soto.aop;
2
3 import java.lang.reflect.Method JavaDoc;
4
5
6 /**
7  * @author Yanick Duchesne
8  * <dl>
9  * <dt><b>Copyright:</b><dd>Copyright &#169; 2002-2003 <a HREF="http://www.sapia-oss.org">Sapia Open Source Software</a>. All Rights Reserved.</dd></dt>
10  * <dt><b>License:</b><dd>Read the license.txt file of the jar or visit the
11  * <a HREF="http://www.sapia-oss.org/license.html">license page</a> at the Sapia OSS web site</dd></dt>
12  * </dl>
13
14  */

15 public class TestAroundAdvice implements AroundAdvice {
16   int postCount;
17   int preCount;
18
19   /**
20    * Constructor for TestAroundAdvice.
21    */

22   public TestAroundAdvice() {
23     super();
24   }
25
26   /**
27    * @see org.sapia.soto.aop.AfterAdvice#postInvoke(Invocation)
28    */

29   public void postInvoke(Invocation invocation) throws Throwable JavaDoc {
30     postCount++;
31   }
32
33   /**
34    * @see org.sapia.soto.aop.BeforeAdvice#preInvoke(Invocation)
35    */

36   public void preInvoke(Invocation invocation) throws Throwable JavaDoc {
37     preCount++;
38   }
39 }
40
Popular Tags