(String[] args)
| 27 | } |
| 28 | |
| 29 | private void init(String[] args) { |
| 30 | if (args.length == 0) { |
| 31 | print(HELP_MESSAGE); |
| 32 | System.exit(1); |
| 33 | } else { |
| 34 | if (args[0].startsWith("--")) { |
| 35 | switch (args[0]) { |
| 36 | case "--version": |
| 37 | case "--v": |
| 38 | print("Java2Smali v" + VERSION); |
| 39 | break; |
| 40 | case "--help": |
| 41 | case "--h": |
| 42 | print(HELP_MESSAGE); |
| 43 | break; |
| 44 | case "--no-optimize": |
| 45 | case "--n": |
| 46 | if (args.length > 1) convertAndClean(args[1], false); |
| 47 | else print("[E] Missing file."); |
| 48 | break; |
| 49 | default: |
| 50 | print("[E] Unknown command."); |
| 51 | print(HELP_MESSAGE); |
| 52 | break; |
| 53 | } |
| 54 | } else { |
| 55 | convertAndClean(args[0]); |
| 56 | } |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | private void convertAndClean(String providedPath) { |
| 61 | convertAndClean(providedPath, true); |
no test coverage detected