use Appendable rather than StringBuffer for toJava()
[sbp.git] / src / edu / berkeley / sbp / util / PrintableTree.java
index 802296d..108f13e 100644 (file)
@@ -70,7 +70,7 @@ public abstract class PrintableTree<T extends PrintableTree> implements Iterable
     }
 
     /** append Java code to <tt>sb</tt> which evaluates to this instance */
-    public void toJava(StringBuffer sb) {
+    public void toJava(Appendable sb) throws IOException {
         sb.append("new "+this.getClass().getName()+"(null, ");
         String head = headToJava();
         sb.append(head);