aboutsummaryrefslogtreecommitdiffstats
path: root/tests/features152/synchronization/ParsingAndMatching4.java
blob: 4fe3c6f5d8f25005b5759ec1696753f566fde401 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// unlock and non-static context

public aspect ParsingAndMatching4 {

	before(): unlock() {
		System.err.println("Advice running at "+thisJoinPoint.getSourceLocation());
	}
	
	public static void main(String[] args) {
		new Foo().nonstaticM();
	}
	
	static class Foo {
		public void nonstaticM() {
			synchronized (String.class) {
				System.err.println("non-static method running");
			}
		}
	}
}