private void check(NoteKind kind, RuntimeTypeAnnotations_attribute attr) { if (attr == null) return; for (TypeAnnotation anno: attr.annotations) { Position p = anno.position; Note note = null; if (p.offset != -1) addNote(p.offset, note = new Note(kind, anno)); if (p.lvarOffset != null) { for (int i = 0; i < p.lvarOffset.length; i++) { if (note == null) note = new Note(kind, anno); addNote(p.lvarOffset[i], note); } } } }
private void parseTypeAnnotations(TypeAnnotation pa, Element p) { Element pta = new Element("RuntimeVisibleTypeAnnotation"); p.add(pta); Position pos = pa.position; parsePosition(pos, pta); parseAnnotation(pa.annotation, pta); }