*/
public static List extractAnnotations(List annotations, final Attribute attribute, final ClassLoader loader) {
for (Attribute current = attribute; current != null; current = current.next) {
if (current instanceof RuntimeInvisibleAnnotations) {
for (Iterator it = ((RuntimeInvisibleAnnotations) current).annotations.iterator(); it.hasNext();) {
Annotation annotation = (Annotation) it.next();
if (CustomAttribute.TYPE.equals(annotation.type)) {
annotations.add(CustomAttributeHelper.extractCustomAnnotation(annotation));
} else {
AnnotationInfo annotationInfo = getAnnotationInfo(annotation, loader);
annotations.add(annotationInfo);
}
}
} else if (current instanceof RuntimeVisibleAnnotations) {
for (Iterator it = ((RuntimeVisibleAnnotations) current).annotations.iterator(); it.hasNext();) {
Annotation annotation = (Annotation) it.next();
AnnotationInfo annotationInfo = getAnnotationInfo(annotation, loader);
annotations.add(annotationInfo);
}
} else if (current instanceof AnnotationDefaultAttribute) {
AnnotationDefaultAttribute defaultAttribute = (AnnotationDefaultAttribute) current;