Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8061418

Add reification of generic type parameters to the Java programming language

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Other
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: specification
    • Labels:

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                abuckley Alex Buckley
                Reporter:
                abuckley Alex Buckley
              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: