Mercurial > hg > truffle
diff src/share/vm/runtime/reflection.cpp @ 7457:35431a769282
8004823: Add VM support for type annotation reflection
Reviewed-by: dholmes, coleenp
Contributed-by: joel.franck@oracle.com
author | stefank |
---|---|
date | Thu, 20 Dec 2012 10:22:19 +0100 |
parents | 070d523b96a7 |
children | ade95d680b42 |
line wrap: on
line diff
--- a/src/share/vm/runtime/reflection.cpp Wed Dec 19 10:35:08 2012 -0800 +++ b/src/share/vm/runtime/reflection.cpp Thu Dec 20 10:22:19 2012 +0100 @@ -771,6 +771,10 @@ typeArrayOop an_oop = Annotations::make_java_array(method->annotation_default(), CHECK_NULL); java_lang_reflect_Method::set_annotation_default(mh(), an_oop); } + if (java_lang_reflect_Method::has_type_annotations_field()) { + typeArrayOop an_oop = Annotations::make_java_array(method->type_annotations(), CHECK_NULL); + java_lang_reflect_Method::set_type_annotations(mh(), an_oop); + } return mh(); } @@ -849,6 +853,10 @@ typeArrayOop an_oop = Annotations::make_java_array(fd->annotations(), CHECK_NULL); java_lang_reflect_Field::set_annotations(rh(), an_oop); } + if (java_lang_reflect_Field::has_type_annotations_field()) { + typeArrayOop an_oop = Annotations::make_java_array(fd->type_annotations(), CHECK_NULL); + java_lang_reflect_Field::set_type_annotations(rh(), an_oop); + } return rh(); }