KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > interfacesubtypebug > TestAspect


1 /**************************************************************************************
2  * Copyright (c) Jonas BonŽr, Alexandre Vasseur. All rights reserved. *
3  * http://aspectwerkz.codehaus.org *
4  * ---------------------------------------------------------------------------------- *
5  * The software in this package is published under the terms of the LGPL license *
6  * a copy of which has been included with this distribution in the license.txt file. *
7  **************************************************************************************/

8 package test.interfacesubtypebug;
9
10 import org.codehaus.aspectwerkz.definition.Pointcut;
11 import org.codehaus.aspectwerkz.definition.Pointcut;
12 import org.codehaus.aspectwerkz.joinpoint.JoinPoint;
13
14 /**
15  * @author <a HREF="mailto:jboner@codehaus.org">Jonas BonŽr </a>
16  */

17 public class TestAspect {
18     // ============ Pointcuts ============
19

20     /**
21      * @Expression execution(* test.interfacesubtypebug.Intf#.*())
22      */

23     Pointcut interfacePC;
24
25     // ============ Advices ============
26

27     /**
28      * @Around interfacePC
29      */

30     public Object JavaDoc advice1(final JoinPoint joinPoint) throws Throwable JavaDoc {
31         InterfaceSubtypeBug.LOG += "interface ";
32         Object JavaDoc result = joinPoint.proceed();
33         InterfaceSubtypeBug.LOG += "interface ";
34         return result;
35     }
36 }
Popular Tags