blob: 5d75b89551c0730c3ad7f84a5bff978966918fea (
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
|
import org.aspectj.testing.Tester;
class Sup {
static void m() {}
}
public class SuperStaticCallJoinPoint extends Sup {
static boolean ran = false;
public static void main(String[] args) {
new SuperStaticCallJoinPoint().foo();
Tester.check(ran, "didn't run advice");
}
void foo() {
super.m();
}
static void m() {
throw new RuntimeException();
}
}
aspect A {
before(): this(SuperStaticCallJoinPoint) && call(void Sup.m()) {
SuperStaticCallJoinPoint.ran = true;
}
}
|