blob: c82474b22e4e59f78a8a8e7016d6c9d2b15916ce (
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
33
34
35
36
37
38
39
40
|
import org.aspectj.testing.Tester;
public class PrivateIntro {
public static void test() {
Tester.checkEqual(new A1().getWhere(), "A1", "from A1");
Tester.checkEqual(new A2().getWhere(), "A2", "from A2");
}
public static void main(String[] args) {
test();
}
}
class A1 {
private introduction Foo {
String fromWhere() {
return "A1";
}
}
public String getWhere() {
return new Foo().fromWhere();
}
}
class A2 {
private introduction Foo {
String fromWhere() {
return "A2";
}
}
public String getWhere() {
return new Foo().fromWhere();
}
}
class Foo {}
|