blob: c1cc12614fb7955d78ce4d8817260bd5a9aaa80f (
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
|
import java.util.*;
public class Generics<X> {
public static void main(String []argv) {
Generics<String> inst = new Generics<String>();
List<String> ls = new ArrayList<String>();
inst.setter(ls);
List<String> newls = inst.getter();
inst.setThing("abc");
String s = inst.getThing();
}
}
aspect X {
private List<String> Generics.listOfString;
public List<String> Generics.getter() {
return listOfString;
}
public void Generics.setter(List<String> los) {
listOfString = los;
}
}
aspect Y {
private T Generics<T>.thing;
public T Generics<T>.getThing() {
return thing;
}
public void Generics<T>.setThing(T thing) {
this.thing = thing;
}
}
|