public AnnotationEntry[] getAnnotationEntries() { if (annotationsOutOfDate) { // Find attributes that contain annotation data Attribute[] attrs = getAttributes(); List<AnnotationEntry> accumulatedAnnotations = new ArrayList<AnnotationEntry>(); for (int i = 0; i < attrs.length; i++) { Attribute attribute = attrs[i]; if (attribute instanceof Annotations) { Annotations runtimeAnnotations = (Annotations)attribute; for(int j = 0; j < runtimeAnnotations.getAnnotationEntries().length; j++) accumulatedAnnotations.add(runtimeAnnotations.getAnnotationEntries()[j]); } } annotations = accumulatedAnnotations.toArray(new AnnotationEntry[accumulatedAnnotations.size()]); annotationsOutOfDate = false; } return annotations; }
public AnnotationEntry[] getAnnotationEntries() { if (annotationsOutOfDate) { // Find attributes that contain annotation data Attribute[] attrs = getAttributes(); List<AnnotationEntry> accumulatedAnnotations = new ArrayList<AnnotationEntry>(); for (int i = 0; i < attrs.length; i++) { Attribute attribute = attrs[i]; if (attribute instanceof Annotations) { Annotations runtimeAnnotations = (Annotations)attribute; for(int j = 0; j < runtimeAnnotations.getAnnotationEntries().length; j++) accumulatedAnnotations.add(runtimeAnnotations.getAnnotationEntries()[j]); } } annotations = accumulatedAnnotations.toArray(new AnnotationEntry[accumulatedAnnotations.size()]); annotationsOutOfDate = false; } return annotations; }
public AnnotationEntry[] getAnnotationEntries() { if (annotationsOutOfDate) { // Find attributes that contain annotation data Attribute[] attrs = getAttributes(); List<AnnotationEntry> accumulatedAnnotations = new ArrayList<AnnotationEntry>(); for (int i = 0; i < attrs.length; i++) { Attribute attribute = attrs[i]; if (attribute instanceof Annotations) { Annotations runtimeAnnotations = (Annotations)attribute; for(int j = 0; j < runtimeAnnotations.getAnnotationEntries().length; j++) accumulatedAnnotations.add(runtimeAnnotations.getAnnotationEntries()[j]); } } annotations = accumulatedAnnotations.toArray(new AnnotationEntry[accumulatedAnnotations.size()]); annotationsOutOfDate = false; } return annotations; }