blob: 5e95eb8ee603de6f1829d72aaffd2a839bb5f5a5 (
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
26
27
28
29
30
31
32
|
// introductions calling super.
import org.aspectj.testing.Tester;
public class Driver {
public static void test() {
C2 c2 = new C2("FooBar");
Tester.checkEqual(c2.name, "FooBar", "C2's name");
}
public static void main(String[] args) { test(); }
}
class C1 {
public String name = null;
public C1(String name) {
this.name = name;
}
}
class C2 extends C1 {
C2() { super("dummy"); }
}
aspect A {
C2.new(String name) {
super(name);
}
}
|