println(".debug ", cn.sourceDebug == null
? null
: '"' + cn.sourceDebug + '"');
for (int i = 0; i < cn.innerClasses.size(); ++i) {
InnerClassNode in = cn.innerClasses.get(i);
pw.print(".inner class");
pw.print(access(in.access));
if (in.innerName != null) {
pw.print(' ');
pw.print(in.innerName);
}
if (in.name != null) {
pw.print(" inner ");
pw.print(in.name);
}
if (in.outerName != null) {
pw.print(" outer ");
pw.print(in.outerName);
}
pw.println();
}
for (int i = 0; i < cn.fields.size(); ++i) {
FieldNode fn = cn.fields.get(i);
boolean annotations = false;
if (fn.visibleAnnotations != null
&& fn.visibleAnnotations.size() > 0)
{
annotations = true;
}
if (fn.invisibleAnnotations != null
&& fn.invisibleAnnotations.size() > 0)
{
annotations = true;
}
boolean deprecated = (fn.access & Opcodes.ACC_DEPRECATED) != 0;
pw.print("\n.field");
pw.print(access(fn.access));
pw.print(" '");
pw.print(fn.name);
pw.print("' ");
pw.print(fn.desc);
if (fn.signature != null && (!deprecated && !annotations)) {
pw.print(" signature \"");
pw.print(fn.signature);
pw.print("\"");
}
if (fn.value instanceof String) {
StringBuffer buf = new StringBuffer();
AbstractVisitor.appendString(buf, (String) fn.value);
pw.print(" = ");
pw.print(buf.toString());
} else if (fn.value != null) {
pw.print(" = ");
print(fn.value);
pw.println();
}
pw.println();
if (fn.signature != null && (deprecated || annotations)) {
pw.print(".signature \"");
pw.print(fn.signature);
pw.println("\"");
}
if (deprecated) {
pw.println(".deprecated");
}
printAnnotations(fn);
if (deprecated || annotations) {
pw.println(".end field");
}
}
for (int i = 0; i < cn.methods.size(); ++i) {
MethodNode mn = cn.methods.get(i);
pw.print("\n.method");
pw.print(access(mn.access));
pw.print(' ');
pw.print(mn.name);
pw.println(mn.desc);
if (mn.signature != null) {
pw.print(".signature \"");
pw.print(mn.signature);
pw.println("\"");
}
if (mn.annotationDefault != null) {
pw.println(".annotation default");
printAnnotationValue(mn.annotationDefault);
pw.println(".end annotation");
}
printAnnotations(mn);
if (mn.visibleParameterAnnotations != null) {
for (int j = 0; j < mn.visibleParameterAnnotations.length; ++j)
{
List<AnnotationNode> l = mn.visibleParameterAnnotations[j];
if (l != null) {
for (int k = 0; k < l.size(); ++k) {
printAnnotation(l.get(k), 1, j + 1);
}
}
}
}
if (mn.invisibleParameterAnnotations != null) {
for (int j = 0; j < mn.invisibleParameterAnnotations.length; ++j)
{
List<AnnotationNode> l = mn.invisibleParameterAnnotations[j];
if (l != null) {
for (int k = 0; k < l.size(); ++k) {
printAnnotation(l.get(k), 2, j + 1);
}
}
}
}
for (int j = 0; j < mn.exceptions.size(); ++j) {
println(".throws ", mn.exceptions.get(j));
}
if ((mn.access & Opcodes.ACC_DEPRECATED) != 0) {
pw.println(".deprecated");
}
if (mn.instructions.size() > 0) {
labelNames.clear();
for (int j = 0; j < mn.tryCatchBlocks.size(); ++j) {
TryCatchBlockNode tcb = mn.tryCatchBlocks.get(j);
pw.print(".catch ");
pw.print(tcb.type);
pw.print(" from ");
print(tcb.start);
pw.print(" to ");
print(tcb.end);
pw.print(" using ");
print(tcb.handler);
pw.println();
}
for (int j = 0; j < mn.instructions.size(); ++j) {
AbstractInsnNode in = mn.instructions.get(j);
in.accept(new EmptyVisitor() {
@Override
public void visitFrame(
int type,
int local,