April 2018
Intermediate to advanced
910 pages
33h 21m
English
The term reified generics is one that, more often than not, it seems, causes very vocal, animated reactions. Currently, if you declare a variable to be of type List<Integer>, the byte code generated has no real notion of the parameterized type, so it's not discoverable at runtime. If you were to examine the variable at runtime, you would see no mention of Integer. You could, of course, look at the types of each element, but, even then, you can't be sure of the type of the List, as there is nothing enforcing that only the Integer can be added to the List.
Java developers have been clamoring for reified generics, or, put simply, generics that retain their type information at runtime since generics were introduced in Java 5. ...