MCPcopy Index your code
hub / github.com/BruceEckel/OnJava8-Examples / main

Method main

generics/LostInformation.java:13–26  ·  view source on GitHub ↗
(String[] args)

Source from the content-addressed store, hash-verified

11
12public class LostInformation {
13 public static void main(String[] args) {
14 List<Frob> list = new ArrayList<>();
15 Map<Frob, Fnorkle> map = new HashMap<>();
16 Quark<Fnorkle> quark = new Quark<>();
17 Particle<Long, Double> p = new Particle<>();
18 System.out.println(Arrays.toString(
19 list.getClass().getTypeParameters()));
20 System.out.println(Arrays.toString(
21 map.getClass().getTypeParameters()));
22 System.out.println(Arrays.toString(
23 quark.getClass().getTypeParameters()));
24 System.out.println(Arrays.toString(
25 p.getClass().getTypeParameters()));
26 }
27}
28/* Output:
29[E]

Callers

nothing calls this directly

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected