/**
* If the attribute is an annotations attribute, add all annotations attached to it.
*/
public void addAnnotations(Attribute attr, Map<String,MetadataAnnotation> annotations) {
Attribute toUse = attr;
while (toUse != null) {
if (toUse instanceof RuntimeVisibleAnnotations) {
addAnnotationsHelper(annotations,(RuntimeVisibleAnnotations) toUse);
}
toUse = toUse.next;