01: /**************************************************************************************
02: * Copyright (c) Jonas Bon?r, Alexandre Vasseur. All rights reserved. *
03: * http://aspectwerkz.codehaus.org *
04: * ---------------------------------------------------------------------------------- *
05: * The software in this package is published under the terms of the LGPL license *
06: * a copy of which has been included with this distribution in the license.txt file. *
07: **************************************************************************************/package test.aopc;
08:
09: import org.codehaus.aspectwerkz.joinpoint.JoinPoint;
10: import org.codehaus.aspectwerkz.AspectContext;
11: import org.codehaus.aspectwerkz.AspectContext;
12:
13: /**
14: * @author <a href="mailto:alex@gnilux.com">Alexandre Vasseur </a>
15: */
16: public class BaseAspect {
17: private AspectContext m_cci;
18:
19: public BaseAspect(AspectContext 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: }
|