8004823: Add VM support for type annotation reflection

Reviewed-by: dholmes, coleenp
This commit is contained in:
Joel Borggren-Franck 2012-12-20 10:22:19 +01:00 committed by Stefan Karlsson
parent 9c761152db
commit 6ed6cb5375
22 changed files with 302 additions and 11 deletions

View file

@ -228,6 +228,13 @@ class Method : public Metadata {
}
return ik->annotations()->get_method_default_annotations_of(method_idnum());
}
AnnotationArray* type_annotations() const {
InstanceKlass* ik = method_holder();
Annotations* type_annos = ik->type_annotations();
if (type_annos == NULL)
return NULL;
return type_annos->get_method_annotations_of(method_idnum());
}
#ifdef CC_INTERP
void set_result_index(BasicType type);
@ -794,6 +801,7 @@ class Method : public Metadata {
Array<AnnotationArray*>* methods_annotations,
Array<AnnotationArray*>* methods_parameter_annotations,
Array<AnnotationArray*>* methods_default_annotations,
Array<AnnotationArray*>* methods_type_annotations,
bool idempotent = false);
// size of parameters