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