8007320: NPG: move method annotations

Allocate method annotations and attach to ConstMethod if present

Reviewed-by: dcubed, jiangli, sspitsyn, iklam
This commit is contained in:
Coleen Phillimore 2013-02-11 14:06:22 -05:00
parent ee53020f94
commit faea95b8d3
19 changed files with 862 additions and 838 deletions

View file

@ -1573,9 +1573,9 @@ JVM_ENTRY(jbyteArray, JVM_GetClassTypeAnnotations(JNIEnv *env, jclass cls))
if (!java_lang_Class::is_primitive(JNIHandles::resolve(cls))) {
Klass* k = java_lang_Class::as_Klass(JNIHandles::resolve(cls));
if (k->oop_is_instance()) {
Annotations* type_annotations = InstanceKlass::cast(k)->type_annotations();
AnnotationArray* type_annotations = InstanceKlass::cast(k)->class_type_annotations();
if (type_annotations != NULL) {
typeArrayOop a = Annotations::make_java_array(type_annotations->class_annotations(), CHECK_NULL);
typeArrayOop a = Annotations::make_java_array(type_annotations, CHECK_NULL);
return (jbyteArray) JNIHandles::make_local(env, a);
}
}