mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-13 21:55:01 +07:00
find type parameters for class
This commit is contained in:
+23
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
+22
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
class Test extends Super<String>{
|
||||
}
|
||||
Reference in New Issue
Block a user