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 examples.cflow;
08:
09: /**
10: * @author <a href="mailto:jboner@codehaus.org">Jonas BonŽr </a>
11: */
12: public class Target {
13:
14: public void step1() {
15: System.out.println(" --> invoking step1");
16: step2();
17: }
18:
19: public void step2() {
20: System.out.println(" --> invoking step2");
21: }
22:
23: public static void main(String[] args) {
24: Target target = new Target();
25: System.out.println("\n--------------------------");
26: System.out
27: .println("step2 is called in the cflow of step1 => should trigger the advice");
28: target.step1();
29: System.out.println("\n--------------------------");
30: System.out
31: .println("step2 is called directly (not in cflow of step1) => should NOT trigger the advice");
32: target.step2();
33: }
34: }
|