blob: 6e786be63beebc4917b61a4f4d506974e31d664d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
// matching lock in a transformed non-static method...
public aspect Seven {
public static void main(String[] args) {
new C().b();
}
before(): !within(Seven) && lock() {
System.err.println("Locking occurring at "+thisJoinPoint);
System.err.println(thisJoinPoint.getSourceLocation().getFileName());
}
}
class C {
public synchronized void b() {
System.err.println("hello");
}
}
|