blob: e88a95f74df1f58f7fedfd1c251b6759904b4ec2 (
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
|
public class OtherTargeters {
public static void main(String[] args) {
new OtherTargeters().foo();
}
// This method will have branch instructions that target a return which must be
// adjusted to target the monitor exit block
public synchronized void foo() {
int i = 35;
if (i==35) {
System.err.println("foo() running");
}
}
public void goo() {
int i = 35;
if (i==35) {
System.err.println("goo() running");
}
}
}
aspect X {
before(): execution(* foo(..)) {System.err.println("advice running");}
}
|