blob: 50cac3ee72c07067107154e93e5760bed0ea4b51 (
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
|
public class Simple2 {
public static void main(String []argv) {
Base<Integer> base = new Base<Integer>();
List<Integer> intList = new ArrayList<Integer>();
intList.add(5);
base.f1 = intList;
base.copy();
System.err.println("f2.get(0)=>"+f2.get(0));
}
}
class Base<N extends Number> {
public List<N> f1;
}
aspect X {
public List<Z> Base<Z>.f2;
public void Base.copy() {
f2=f1;
}
}
|