|
|
@ -20,6 +20,7 @@ |
|
|
|
package jode; |
|
|
|
package jode; |
|
|
|
import java.util.*; |
|
|
|
import java.util.*; |
|
|
|
import jode.bytecode.ClassInfo; |
|
|
|
import jode.bytecode.ClassInfo; |
|
|
|
|
|
|
|
import java.io.IOException; |
|
|
|
|
|
|
|
|
|
|
|
public class JodeEnvironment { |
|
|
|
public class JodeEnvironment { |
|
|
|
Hashtable imports; |
|
|
|
Hashtable imports; |
|
|
@ -136,7 +137,10 @@ public class JodeEnvironment { |
|
|
|
private void dumpHeader(TabbedPrintWriter writer) |
|
|
|
private void dumpHeader(TabbedPrintWriter writer) |
|
|
|
throws java.io.IOException |
|
|
|
throws java.io.IOException |
|
|
|
{ |
|
|
|
{ |
|
|
|
writer.println("/* "+ className + " - Decompiled by JoDe (Jochen's Decompiler)\n * Send comments or bug reports to Jochen Hoenicke <jochenh@bigfoot.com>\n */"); |
|
|
|
writer.println("/* "+ className |
|
|
|
|
|
|
|
+ " - Decompiled by JoDe (Jochen's Decompiler)\n" |
|
|
|
|
|
|
|
+ " * Send comments or bug reports to " |
|
|
|
|
|
|
|
+ Decompiler.email + "\n */"); |
|
|
|
if (pkg.length() != 0) |
|
|
|
if (pkg.length() != 0) |
|
|
|
writer.println("package "+pkg+";"); |
|
|
|
writer.println("package "+pkg+";"); |
|
|
|
|
|
|
|
|
|
|
@ -154,7 +158,8 @@ public class JodeEnvironment { |
|
|
|
System.err.println(message); |
|
|
|
System.err.println(message); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void doClass(String className) |
|
|
|
public void doClass(String className, TabbedPrintWriter writer) |
|
|
|
|
|
|
|
throws IOException |
|
|
|
{ |
|
|
|
{ |
|
|
|
ClassInfo clazz; |
|
|
|
ClassInfo clazz; |
|
|
|
try { |
|
|
|
try { |
|
|
@ -174,14 +179,8 @@ public class JodeEnvironment { |
|
|
|
main = new ClassAnalyzer(null, clazz, this); |
|
|
|
main = new ClassAnalyzer(null, clazz, this); |
|
|
|
main.analyze(); |
|
|
|
main.analyze(); |
|
|
|
|
|
|
|
|
|
|
|
TabbedPrintWriter writer = |
|
|
|
|
|
|
|
new TabbedPrintWriter(System.out, " "); |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
dumpHeader(writer); |
|
|
|
dumpHeader(writer); |
|
|
|
main.dumpSource(writer); |
|
|
|
main.dumpSource(writer); |
|
|
|
} catch (java.io.IOException e) { |
|
|
|
|
|
|
|
e.printStackTrace(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* Marks the clazz as used, so that it will be imported if used often |
|
|
|
/* Marks the clazz as used, so that it will be imported if used often |
|
|
|