On the Algorithm for Specializing Java Programs With Generic Types

Source: University of Minnesota

Favorite

Free registration required

Java 5.0 added classes with a type parameter, also known as generic types, to better support generic programming. Generic types in Java allow programmers to write code that works for different types, with the type safety checks performed at compilation time. Generic classes in Java function by type erasure. Type erasure works by creating a single instance of the generic class, removing all type-specific information from the generic class, and inserting typecasts to guarantee type-safe calls to instances of the generic class. The selection of the type erasure strategy when implementing the Java generics functionality meant that very few changes were necessary to the Java virtual machine.
Format:PDF Size:115.20
Date:May 2008