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

Need higher quality runtime reflection data

XMLWordPrintable

      ADDITIONAL SYSTEM INFORMATION :
      OS-indepenedent

      A DESCRIPTION OF THE PROBLEM :
      Currently the Class/Type system reflection is pretty limited at runtime--lots of valuable information (particularly the actual types of type parameters) are lost to erasure. It would be highly desirable to have some mechanism that allowed this information to be available upon runtime reflection. For example, today Thing[Integer] is the same thing as Thing[Boolean] because the type parameter values are lost. Not required, but the Class/Type model could be cleaner, but I understand the history, so that's not vital. Having some way to "relax" type erasure for the purposes of reflection is the ask. Scala had done it thru the TypeTag mechanism, which frankly is a bit over-engineered but does the job.


            smarks Stuart Marks
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: