mirror of
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-08-18 02:11:48 +02:00
26 lines
512 B
Java
26 lines
512 B
Java
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;
|
|
}
|
|
}
|