statistics = true;
} else if (arg.startsWith("--optimize-list=")) {
if (dontOptimizeListFile != null) {
System.err.println("--optimize-list and "
+ "--no-optimize-list are incompatible.");
throw new UsageException();
}
optimize = true;
optimizeListFile = arg.substring(arg.indexOf('=') + 1);
} else if (arg.startsWith("--no-optimize-list=")) {
if (dontOptimizeListFile != null) {
System.err.println("--optimize-list and "
+ "--no-optimize-list are incompatible.");
throw new UsageException();
}
optimize = true;
dontOptimizeListFile = arg.substring(arg.indexOf('=') + 1);
} else if (arg.equals("--keep-classes")) {
keepClassesInJar = true;
} else if (arg.startsWith("--output=")) {
outName = arg.substring(arg.indexOf('=') + 1);
if (outName.endsWith(".zip") ||
outName.endsWith(".jar") ||
outName.endsWith(".apk")) {
jarOutput = true;
} else if (outName.endsWith(".dex") ||
outName.equals("-")) {
jarOutput = false;
} else {
System.err.println("unknown output extension: " +
outName);
throw new UsageException();
}
} else if (arg.startsWith("--dump-to=")) {
humanOutName = arg.substring(arg.indexOf('=') + 1);
} else if (arg.startsWith("--dump-width=")) {
arg = arg.substring(arg.indexOf('=') + 1);
dumpWidth = Integer.parseInt(arg);
} else if (arg.startsWith("--dump-method=")) {
methodToDump = arg.substring(arg.indexOf('=') + 1);
jarOutput = false;
} else if (arg.startsWith("--positions=")) {
String pstr = arg.substring(arg.indexOf('=') + 1).intern();
if (pstr == "none") {
positionInfo = PositionList.NONE;
} else if (pstr == "important") {
positionInfo = PositionList.IMPORTANT;
} else if (pstr == "lines") {
positionInfo = PositionList.LINES;
} else {
System.err.println("unknown positions option: " +
pstr);
throw new UsageException();
}
} else if (arg.equals("--no-locals")) {
localInfo = false;
} else {
System.err.println("unknown option: " + arg);
throw new UsageException();
}
}
int fileCount = args.length - at;
if (fileCount == 0) {
if (!emptyOk) {
System.err.println("no input files specified");
throw new UsageException();
}
} else if (emptyOk) {
System.out.println("ignoring input files");
at = 0;
fileCount = 0;