@Override public TextBuffer toJava(int indent, BytecodeMappingTracer tracer) { TextBuffer buf = new TextBuffer(); boolean islabeled = isLabeled(); buf.append(ExprProcessor.listToJava(varDefinitions, indent, tracer)); if (islabeled) { buf.appendIndent(indent++).append("label").append(this.id.toString()).append(": {").appendLineSeparator(); tracer.incrementCurrentSourceLine(); } boolean notempty = false; for (int i = 0; i < stats.size(); i++) { Statement st = stats.get(i); if (i > 0 && notempty) { buf.appendLineSeparator(); tracer.incrementCurrentSourceLine(); } TextBuffer str = ExprProcessor.jmpWrapper(st, indent, false, tracer); buf.append(str); notempty = !str.containsOnlyWhitespaces(); } if (islabeled) { buf.appendIndent(indent-1).append("}").appendLineSeparator(); tracer.incrementCurrentSourceLine(); } return buf; }
public TextBuffer toJava(int indent, BytecodeMappingTracer tracer) { TextBuffer buf = new TextBuffer(); boolean islabeled = isLabeled(); buf.append(ExprProcessor.listToJava(varDefinitions, indent, tracer)); if (islabeled) { buf.appendIndent(indent++).append("label").append(this.id.toString()).append(": {").appendLineSeparator(); tracer.incrementCurrentSourceLine(); } boolean notempty = false; for (int i = 0; i < stats.size(); i++) { Statement st = stats.get(i); if (i > 0 && notempty) { buf.appendLineSeparator(); tracer.incrementCurrentSourceLine(); } TextBuffer str = ExprProcessor.jmpWrapper(st, indent, false, tracer); buf.append(str); notempty = !str.containsOnlyWhitespaces(); } if (islabeled) { buf.appendIndent(indent-1).append("}").appendLineSeparator(); tracer.incrementCurrentSourceLine(); } return buf; }