KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > aspectutilmethodbug > DemoAspect


1 package test.aspectutilmethodbug;
2
3 import org.codehaus.aspectwerkz.joinpoint.JoinPoint;
4
5 public class DemoAspect {
6
7     /**
8      * @Around execution(public void test.aspectutilmethodbug.Test.invoke())
9      */

10     public Object JavaDoc trace(final JoinPoint joinPoint) throws Throwable JavaDoc {
11         Test.log("before ");
12         Object JavaDoc result = null;
13         try {
14             result = joinPoint.proceed();
15         } catch (Throwable JavaDoc throwable) {
16             throwable.printStackTrace();
17         }
18         Test.log("after ");
19         return result;
20     }
21
22     /**
23      * Method that screwed up the advice method indexing.
24      */

25     private void log(String JavaDoc message) {
26     }
27 }
Popular Tags