|
|
@ -28,14 +28,15 @@ public class Decompiler { |
|
|
|
public static boolean debugAnalyze = false; |
|
|
|
public static boolean debugAnalyze = false; |
|
|
|
public static boolean showLVT = false; |
|
|
|
public static boolean showLVT = false; |
|
|
|
public static boolean doChecks = false; |
|
|
|
public static boolean doChecks = false; |
|
|
|
|
|
|
|
public static boolean prettyLocals = false; |
|
|
|
public static boolean immediateOutput = false; |
|
|
|
public static boolean immediateOutput = false; |
|
|
|
public static int importPackageLimit = 3; |
|
|
|
public static int importPackageLimit = 3; |
|
|
|
public static int importClassLimit = 3; |
|
|
|
public static int importClassLimit = 3; |
|
|
|
|
|
|
|
|
|
|
|
public static void usage() { |
|
|
|
public static void usage() { |
|
|
|
System.err.println("use: jode [-v][-imm][-debug][-analyze][-flow]" |
|
|
|
System.err.println("use: jode [-v][--imm][--debug][--analyze][--flow]" |
|
|
|
+"[-type][-inout][-lvt][-check]" |
|
|
|
+"[--type][--inout][--lvt][--check]" |
|
|
|
+"[-import pkglimit clslimit]" |
|
|
|
+"[--import pkglimit clslimit]" |
|
|
|
+" class1 [class2 ...]"); |
|
|
|
+" class1 [class2 ...]"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -45,23 +46,25 @@ public class Decompiler { |
|
|
|
for (i=0; i<params.length && params[i].startsWith("-"); i++) { |
|
|
|
for (i=0; i<params.length && params[i].startsWith("-"); i++) { |
|
|
|
if (params[i].equals("-v")) |
|
|
|
if (params[i].equals("-v")) |
|
|
|
isVerbose = true; |
|
|
|
isVerbose = true; |
|
|
|
else if (params[i].equals("-imm")) |
|
|
|
else if (params[i].equals("--imm")) |
|
|
|
immediateOutput = true; |
|
|
|
immediateOutput = true; |
|
|
|
else if (params[i].equals("-debug")) |
|
|
|
else if (params[i].equals("--debug")) |
|
|
|
isDebugging = true; |
|
|
|
isDebugging = true; |
|
|
|
else if (params[i].equals("-type")) |
|
|
|
else if (params[i].equals("--type")) |
|
|
|
isTypeDebugging = true; |
|
|
|
isTypeDebugging = true; |
|
|
|
else if (params[i].equals("-analyze")) |
|
|
|
else if (params[i].equals("--analyze")) |
|
|
|
debugAnalyze = true; |
|
|
|
debugAnalyze = true; |
|
|
|
else if (params[i].equals("-flow")) |
|
|
|
else if (params[i].equals("--flow")) |
|
|
|
isFlowDebugging = true; |
|
|
|
isFlowDebugging = true; |
|
|
|
else if (params[i].equals("-inout")) |
|
|
|
else if (params[i].equals("--inout")) |
|
|
|
debugInOut = true; |
|
|
|
debugInOut = true; |
|
|
|
else if (params[i].equals("-lvt")) |
|
|
|
else if (params[i].equals("--lvt")) |
|
|
|
showLVT = true; |
|
|
|
showLVT = true; |
|
|
|
else if (params[i].equals("-check")) |
|
|
|
else if (params[i].equals("--check")) |
|
|
|
doChecks = true; |
|
|
|
doChecks = true; |
|
|
|
else if (params[i].equals("-import")) { |
|
|
|
else if (params[i].equals("--pretty")) |
|
|
|
|
|
|
|
prettyLocals = true; |
|
|
|
|
|
|
|
else if (params[i].equals("--import")) { |
|
|
|
importPackageLimit = Integer.parseInt(params[++i]); |
|
|
|
importPackageLimit = Integer.parseInt(params[++i]); |
|
|
|
importClassLimit = Integer.parseInt(params[++i]); |
|
|
|
importClassLimit = Integer.parseInt(params[++i]); |
|
|
|
} else if (params[i].equals("--")) { |
|
|
|
} else if (params[i].equals("--")) { |
|
|
|