JDK-8061418 : Add reification of generic type parameters to the Java programming language
  • Type: Enhancement
  • Component: specification
  • Sub-Component: language
  • Priority: P4
  • Status: Closed
  • Resolution: Other
  • Submitted: 2004-09-07
  • Updated: 2020-04-29
  • Resolved: 2014-10-17
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
Type parameters were added to the Java programming language in the 1.5 release.  While core reflection was updated to provide information about the generic type information, only structural information is provided.  That is, core reflection can tell you that a method in a class has a generic return type and that a class has a type variable.  However, core reflection cannot tell you that a particular Set object is a Set<String> or Set<Number> instead of just a Set.  Currently, such information is not available at runtime because generics in Java and implemented via erasure; roughtly speaking javac transforms a generic Java program to a non-generic program with casts.  Reification would make the type variable information available at runtime too; that information would be useful for certain programming idioms.

Comments
The 'specification' component of the Java Bug System is for reporting technical errors and ambiguities in the text of The Java Language Specification and The JVM Specification. It is not the venue to propose new features in the Java language or JVM. Ongoing feature development is carried out in OpenJDK (http://openjdk.java.net/jeps/); corresponding enhancements to The Java Language Specification and The JVM Specification are managed through the Java Community Process (http://jcp.org/).
17-10-2014

EVALUATION Under discussion as a potential feature in Java SE 7.
28-11-2006