JDK-8009382 : Add JVM_Get{Field|Method}TypeAnnotations
  • Type: Sub-task
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2013-03-04
  • Updated: 2017-05-17
  • Resolved: 2013-03-26
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 Other
8Fixed hs25Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
In order to reduce the size overhead of Type Annotations on reflective objects, and in order to provide the desired semantics with respect to redefine classes for type annotation, the core reflection code needs a way to query the VM for the current type annotation bytes for a given Method or Field.

This was done for regular annotations in issue JDK-6422541 where the following was added:

Constructor - needs JVM_GetMethodAnnotations() and
              JVM_GetMethodParameterAnnotations();
              does not need JVM_GetMethodDefaultAnnotations()
Field - needs JVM_GetFieldAnnotations()
Method - needs JVM_GetMethodAnnotations(),
              JVM_GetMethodDefaultAnnotations, and
              JVM_GetMethodParameterAnnotations()

For type annotations only

JVM_GetMethodTypeAnnotations() and
JVM_GetFieldTypeAnnotations()

are needed due to Constructor being a method from the VM's point of view. Also default values are handled by the previous jvm.h interface.