summaryrefslogtreecommitdiffstats
path: root/tests/bugs/binaryCompat/TraceWithInnerV2.aj
blob: 297fdfba73ce096c0ec96545ec8b11a47e220bf9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
aspect Trace {
	public static boolean expectNoSuchMethodError = false;
	
	before(): execution(void doit(..)) {
		System.out.println("entering");
		
	}

	public void method() {
		// Extra method to do nothing but test if the numbering still behaves	
	}

	static aspect InnerTrace {
		before(): execution(void doit(..)) {
			System.out.println("Inner entering");
		}
		
		after() returning: execution(void doit(..)) {
			System.out.println("Inner exiting");
		}
		
		after() throwing: execution(void doit(..)) {
			System.out.println("Inner chucking");
		}
		
		before(): execution(* noMatch(..)) {
			System.out.println("This doesn't match anything, but checks the sequence number for the next bit of advice is OK");
		}
	}
	
	after() returning: execution(void doit(..)) {
		System.out.println("exiting");
	}
}