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.aopc;
9   
10  import org.codehaus.aspectwerkz.joinpoint.JoinPoint;
11  import org.codehaus.aspectwerkz.CrossCuttingInfo;
12  
13  /***
14   * @author <a href="mailto:alex@gnilux.com">Alexandre Vasseur </a>
15   */
16  public class BaseAspect {
17      private CrossCuttingInfo m_cci;
18  
19      public BaseAspect(CrossCuttingInfo cci) {
20          m_cci = cci;
21      }
22  
23      public Object logAround(JoinPoint jp) throws Throwable {
24          String vfqn = m_cci.getUuid() + "/" + m_cci.getName();
25          ((Callable) jp.getTarget()).log(vfqn + ".beforeAround ");
26          Object result = jp.proceed();
27          ((Callable) jp.getTarget()).log(vfqn + ".afterAround ");
28          return result;
29      }
30  }