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.clapp;
9
10 import org.codehaus.aspectwerkz.Pointcut;
11 import org.codehaus.aspectwerkz.joinpoint.JoinPoint;
12
13 /***
14 * @author <a href="mailto:jboner@codehaus.org">Jonas Bonér </a>
15 * @Aspect
16 */
17 public class TestAspect {
18 /***
19 * @Expression execution(* test.xmldef.clapp.Target.callme(..))
20 */
21 Pointcut pc1;
22
23 /***
24 * @Around pc1
25 */
26 public Object execute(final JoinPoint joinPoint) throws Throwable {
27 Integer result = (Integer) joinPoint.proceed();
28 return new Integer(-1 * result.intValue());
29 }
30 }