Debian Codegraph @

framework/tests/all-systems/GenericExtendsTypeVars.java

raw
1 /*
2 * Sets up recursive bounds where the bounds themselves are type variables.
3 */
4
5 interface MMyList<LL> {}
6
7 interface MMyMap<KEY, VALUE> {}
8
9 class Tester<EE extends TT, TT extends MMyList<EE>> {}
10
11 class WithWildcard<ZZ extends QQ, QQ extends YY, YY extends MMyMap<QQ, ZZ>> {
12 void context() {
13 ZZ zz = null;
14 QQ qq = null;
15 YY yy = null;
16 }
17 }
18
19 @SuppressWarnings("initialization.fields.uninitialized")
20 class Test<KK extends FF, FF extends MMyMap<KK, KK>> {
21 KK kk;
22 FF ff;
23 }
24
25 @SuppressWarnings("initialization.fields.uninitialized")
26 class RecursiveTypevarClass<T extends RecursiveTypevarClass<T>> {
27 T t;
28 }
29
30 class RecursiveImplements implements MMyList<RecursiveImplements> {}