blob: f612ce5e54a81a4fd14032ae46423350739b93ae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
import org.aspectj.testing.Tester;
public class IntroducingMethodsOnPlusImplementedInterfaces {
public static void main(String[] args) {
new IntroducingMethodsOnPlusImplementedInterfaces().realMain(args);
}
public void realMain(String[] args) {
new D().f();
}
static {
Tester.expectEvent("D.f");
}
}
class D extends Thread {}
//static
aspect A {
static interface I {}
//(subtypes(Thread)) +implements I;
//declare parents: (subtypes(Thread)) implements I;
declare parents: Thread+ implements I;
public void I.f() { Tester.event("D.f"); }
}
|