From 6e2fd59cb6b8c91eeb20b606c6350b10f937d22e Mon Sep 17 00:00:00 2001 From: jochen Date: Fri, 15 Jan 1999 10:57:55 +0000 Subject: [PATCH] different header format. Writer is given as parameter git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@150 379699f6-c40d-0410-875b-85095c16579e --- jode/jode/decompiler/ImportHandler.java | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/jode/jode/decompiler/ImportHandler.java b/jode/jode/decompiler/ImportHandler.java index 860c470..239bae2 100644 --- a/jode/jode/decompiler/ImportHandler.java +++ b/jode/jode/decompiler/ImportHandler.java @@ -20,6 +20,7 @@ package jode; import java.util.*; import jode.bytecode.ClassInfo; +import java.io.IOException; public class JodeEnvironment { Hashtable imports; @@ -136,7 +137,10 @@ public class JodeEnvironment { private void dumpHeader(TabbedPrintWriter writer) throws java.io.IOException { - writer.println("/* "+ className + " - Decompiled by JoDe (Jochen's Decompiler)\n * Send comments or bug reports to Jochen Hoenicke \n */"); + writer.println("/* "+ className + + " - Decompiled by JoDe (Jochen's Decompiler)\n" + + " * Send comments or bug reports to " + + Decompiler.email + "\n */"); if (pkg.length() != 0) writer.println("package "+pkg+";"); @@ -154,7 +158,8 @@ public class JodeEnvironment { System.err.println(message); } - public void doClass(String className) + public void doClass(String className, TabbedPrintWriter writer) + throws IOException { ClassInfo clazz; try { @@ -174,14 +179,8 @@ public class JodeEnvironment { main = new ClassAnalyzer(null, clazz, this); main.analyze(); - TabbedPrintWriter writer = - new TabbedPrintWriter(System.out, " "); - try { - dumpHeader(writer); - main.dumpSource(writer); - } catch (java.io.IOException e) { - e.printStackTrace(); - } + dumpHeader(writer); + main.dumpSource(writer); } /* Marks the clazz as used, so that it will be imported if used often