private Attribute getAttribute(int numAnnotations, CPUTF8[] types, int[] pairCounts, Iterator namesIterator) {
Annotation[] annotations = new Annotation[numAnnotations];
for (int i = 0; i < numAnnotations; i++) {
annotations[i] = getAnnotation(types[i], pairCounts[i], namesIterator);
}
return new RuntimeVisibleorInvisibleAnnotationsAttribute(type
.equals("RVA") ? "RuntimeVisibleAnnotations"
: "RuntimeInvisibleAnnotations",
annotations);
}