mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8004823: Add VM support for type annotation reflection
Reviewed-by: dholmes, coleenp
This commit is contained in:
parent
9c761152db
commit
6ed6cb5375
22 changed files with 302 additions and 11 deletions
|
@ -65,6 +65,17 @@ AnnotationArray* fieldDescriptor::annotations() const {
|
|||
return md->at(index());
|
||||
}
|
||||
|
||||
AnnotationArray* fieldDescriptor::type_annotations() const {
|
||||
InstanceKlass* ik = field_holder();
|
||||
Annotations* type_annos = ik->type_annotations();
|
||||
if (type_annos == NULL)
|
||||
return NULL;
|
||||
Array<AnnotationArray*>* md = type_annos->fields_annotations();
|
||||
if (md == NULL)
|
||||
return NULL;
|
||||
return md->at(index());
|
||||
}
|
||||
|
||||
constantTag fieldDescriptor::initial_value_tag() const {
|
||||
return constants()->tag_at(initial_value_index());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue