this.rows.add(versionComment);
// Class annotations
RuntimeInvisibleAnnotationsAttribute annInvisible = cf.getAttributes()
.getRuntimeInvisibleAnnotationsAttribute();
RuntimeVisibleAnnotationsAttribute annVisible = cf.getAttributes()
.getRuntimeVisibleAnnotationsAttribute();
List<Annotation> classAnnotations = new ArrayList<Annotation>();
if (annInvisible != null) {
classAnnotations.addAll(annInvisible.getAnnotations());
}
if (annVisible != null) {
classAnnotations.addAll(annVisible.getAnnotations());
}
for (Annotation annotation : classAnnotations) {
ClassAnnotationDefRow adr = new ClassAnnotationDefRow(annotation);
this.rows.add(adr);
}
// Class
this.classDef = new ClassDefRow(cf, true);
this.rows.add(this.classDef);
this.rows.add(new BlankRow());
// Fields
java.util.List fields = cf.getFields();
for (int i = 0; i < fields.size(); i++) {
Field field = (Field) fields.get(i);
// Field annotations
RuntimeInvisibleAnnotationsAttribute fieldAnnInvisible = field
.getAttributes().getRuntimeInvisibleAnnotationsAttribute();
RuntimeVisibleAnnotationsAttribute fieldAnnVisible = field
.getAttributes().getRuntimeVisibleAnnotationsAttribute();
List<Annotation> fieldAnnotations = new ArrayList<Annotation>();
if (fieldAnnInvisible != null) {
fieldAnnotations.addAll(fieldAnnInvisible.getAnnotations());
}
if (fieldAnnVisible != null) {
fieldAnnotations.addAll(fieldAnnVisible.getAnnotations());
}
for (Annotation annotation : fieldAnnotations) {
FieldAnnotationDefRow fadr = new FieldAnnotationDefRow(
annotation);
this.rows.add(fadr);
}
FieldDefRow fdr = new FieldDefRow(cf, field);
this.rows.add(fdr);
this.classDef.addField(fdr);
}
if (fields.size() > 0) {
this.rows.add(new BlankRow());
}
// Methods
java.util.List methods = cf.getMethods();
for (int i = 0; i < methods.size(); i++) {
Method method = (Method) methods.get(i);
// Method annotations
boolean deprecatedAnnotationAdded = false;
RuntimeInvisibleAnnotationsAttribute methodAnnInvisible = method
.getAttributes().getRuntimeInvisibleAnnotationsAttribute();
RuntimeVisibleAnnotationsAttribute methodAnnVisible = method
.getAttributes().getRuntimeVisibleAnnotationsAttribute();
List<Annotation> methodAnnotations = new ArrayList<Annotation>();
if (methodAnnInvisible != null) {
methodAnnotations.addAll(methodAnnInvisible.getAnnotations());
}
if (methodAnnVisible != null) {
methodAnnotations.addAll(methodAnnVisible.getAnnotations());
}
for (Annotation annotation : methodAnnotations) {
MethodAnnotationDefRow madr = new MethodAnnotationDefRow(
annotation);
this.rows.add(madr);