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.bindingsyntax;
9
10 import org.codehaus.aspectwerkz.joinpoint.JoinPoint;
11
12 /***
13 * @author <a href="mailto:jboner@codehaus.org">Jonas Bonér </a>
14 */
15 public class TestAspect {
16 public Object advice1(final JoinPoint joinPoint) throws Throwable {
17 String last = AdviceBindingTest.flow;
18 AdviceBindingTest.flow += " ";
19
20
21 Object r = joinPoint.proceed();
22
23
24 AdviceBindingTest.flow = last;
25 return '1' + (String) r;
26 }
27
28 public Object advice2(final JoinPoint joinPoint) throws Throwable {
29 String last = AdviceBindingTest.flow;
30 AdviceBindingTest.flow += " ";
31
32
33 Object r = joinPoint.proceed();
34
35
36 AdviceBindingTest.flow = last;
37 return '2' + (String) r;
38 }
39 }