find type parameters for class

This commit is contained in:
anna
2009-11-24 16:23:53 +03:00
parent ce736df9a2
commit 073e7392bb
13 changed files with 133 additions and 28 deletions
@@ -0,0 +1,23 @@
import java.util.List;
import java.util.Set;
class Test {
List<String> l;
Test() {
Set<String> s = new HashSet<String>();
for (String t : s) {
System.out.println(t);
}
}
void foo(String t) {
System.out.println(t);
}
void bar() {
for (String t : l) {
System.out.println(t);
}
}
}
@@ -0,0 +1,22 @@
import java.util.*;
class Super<T> {
List<T> l;
Super() {
Set<T> s = new HashSet<T>();
for (T t : s) {
System.out.println(t);
}
}
void foo(T t) {
System.out.println(t);
}
void bar() {
for (T t : l) {
System.out.println(t);
}
}
}
@@ -0,0 +1,2 @@
class Test extends Super<String>{
}