Mercurial > hg > truffle
comparison src/share/vm/runtime/fieldDescriptor.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 | 18fb7da42534 |
children | 927a311d00f9 |
comparison
equal
deleted
inserted
replaced
7456:7d42f3b08300 | 7457:35431a769282 |
---|---|
58 } | 58 } |
59 | 59 |
60 AnnotationArray* fieldDescriptor::annotations() const { | 60 AnnotationArray* fieldDescriptor::annotations() const { |
61 InstanceKlass* ik = field_holder(); | 61 InstanceKlass* ik = field_holder(); |
62 Array<AnnotationArray*>* md = ik->fields_annotations(); | 62 Array<AnnotationArray*>* md = ik->fields_annotations(); |
63 if (md == NULL) | |
64 return NULL; | |
65 return md->at(index()); | |
66 } | |
67 | |
68 AnnotationArray* fieldDescriptor::type_annotations() const { | |
69 InstanceKlass* ik = field_holder(); | |
70 Annotations* type_annos = ik->type_annotations(); | |
71 if (type_annos == NULL) | |
72 return NULL; | |
73 Array<AnnotationArray*>* md = type_annos->fields_annotations(); | |
63 if (md == NULL) | 74 if (md == NULL) |
64 return NULL; | 75 return NULL; |
65 return md->at(index()); | 76 return md->at(index()); |
66 } | 77 } |
67 | 78 |