Mercurial > hg > truffle
comparison 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 |
comparison
equal
deleted
inserted
replaced
7456:7d42f3b08300 | 7457:35431a769282 |
---|---|
769 } | 769 } |
770 if (java_lang_reflect_Method::has_annotation_default_field()) { | 770 if (java_lang_reflect_Method::has_annotation_default_field()) { |
771 typeArrayOop an_oop = Annotations::make_java_array(method->annotation_default(), CHECK_NULL); | 771 typeArrayOop an_oop = Annotations::make_java_array(method->annotation_default(), CHECK_NULL); |
772 java_lang_reflect_Method::set_annotation_default(mh(), an_oop); | 772 java_lang_reflect_Method::set_annotation_default(mh(), an_oop); |
773 } | 773 } |
774 if (java_lang_reflect_Method::has_type_annotations_field()) { | |
775 typeArrayOop an_oop = Annotations::make_java_array(method->type_annotations(), CHECK_NULL); | |
776 java_lang_reflect_Method::set_type_annotations(mh(), an_oop); | |
777 } | |
774 return mh(); | 778 return mh(); |
775 } | 779 } |
776 | 780 |
777 | 781 |
778 oop Reflection::new_constructor(methodHandle method, TRAPS) { | 782 oop Reflection::new_constructor(methodHandle method, TRAPS) { |
846 java_lang_reflect_Field::set_signature(rh(), sig()); | 850 java_lang_reflect_Field::set_signature(rh(), sig()); |
847 } | 851 } |
848 if (java_lang_reflect_Field::has_annotations_field()) { | 852 if (java_lang_reflect_Field::has_annotations_field()) { |
849 typeArrayOop an_oop = Annotations::make_java_array(fd->annotations(), CHECK_NULL); | 853 typeArrayOop an_oop = Annotations::make_java_array(fd->annotations(), CHECK_NULL); |
850 java_lang_reflect_Field::set_annotations(rh(), an_oop); | 854 java_lang_reflect_Field::set_annotations(rh(), an_oop); |
855 } | |
856 if (java_lang_reflect_Field::has_type_annotations_field()) { | |
857 typeArrayOop an_oop = Annotations::make_java_array(fd->type_annotations(), CHECK_NULL); | |
858 java_lang_reflect_Field::set_type_annotations(rh(), an_oop); | |
851 } | 859 } |
852 return rh(); | 860 return rh(); |
853 } | 861 } |
854 | 862 |
855 | 863 |