JDK-6545897 : Support reified generics
  • Type: Enhancement
  • Component: specification
  • Sub-Component: language
  • Affected Version: 8.0pe
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2007-04-13
  • Updated: 2010-04-02
  • Resolved: 2007-04-16
Related Reports
Duplicate :  
Description
The Java language and Java SE should support reified generic types (aka 'true' generics)
rather than the current scheme of type erasure.  Intuitively, a programmer expects to
be able to use a generic type wherever a non-generic type can be used.  This is not
the case with type erasure.  Some advantages of reified generics are

1. Getting rid of the unchecked warnings from javac attendant upon
assigning objects of raw type to objects of the corresponding generic
type and the cryptic ClassCastExceptions that can result therefrom at
runtime.

2. Allowing arrays of generic types and parametric cast, instanceof
and catch operations.

3. Allowing 'new' operations on parametric types, e.g., 'new T()'.

4. Allowing the definition of per-instantiated-generic-type static
fields.

Comments
EVALUATION Closing as duplicate of 5098163.
16-04-2007