Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
java.lang.reflect.{Constructor,Field,Method} objects are created with annotations data embedded in the object instead of using a JVM entry point to fetch the current annotations like java.lang.Class. This is effectively a cache of the annotations data since RedefineClasses() does not change the annotations data in place. RedefineClasses() attaches new annotations data to the class when it is redefined. New JVM entry points similar to JVM_GetClassAnnotations() need to be added to the VM, then java.lang.reflect.{Constructor,Field,Method} will need to be modified to use those entry points (see 6422536). The counter field added by 6407335 (java.lang.Class.classRedefinedCount) should be used to determine when the Constructor,Field,Method} annotations data needs to be refetched. 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() From the VM's point of view, constructors are methods so we should be able to use the same entry points. JVM_GetMethodDefaultAnnotations isn't a good choice of method name. It doesn't return annotations at all, but rather a single annotation element value. How about JVM_GetMethodDefaultAnnotationValue ?
|