@Override public void run() { if (help || input == null || input.isEmpty()) { usage(); return; } try { Smali.assemble(getOptions(), input); } catch (IOException ex) { throw new RuntimeException(ex); } }
public static void main(String[] args) { Main main = new Main(); JCommander jc = new JCommander(main); main.jc = jc; jc.setProgramName("smali"); List<JCommander> commandHierarchy = main.getCommandHierarchy(); ExtendedCommands.addExtendedCommand(jc, new AssembleCommand(commandHierarchy)); ExtendedCommands.addExtendedCommand(jc, new HelpCommand(commandHierarchy)); ExtendedCommands.addExtendedCommand(jc, new HlepCommand(commandHierarchy)); jc.parse(args); if (main.version) { version(); } if (jc.getParsedCommand() == null || main.help) { main.usage(); return; } Command command = (Command)jc.getCommands().get(jc.getParsedCommand()).getObjects().get(0); command.run(); }
public static void main(String[] args) { Main main = new Main(); JCommander jc = new JCommander(main); main.jc = jc; jc.setProgramName("smali"); List<JCommander> commandHierarchy = main.getCommandHierarchy(); ExtendedCommands.addExtendedCommand(jc, new AssembleCommand(commandHierarchy)); ExtendedCommands.addExtendedCommand(jc, new HelpCommand(commandHierarchy)); ExtendedCommands.addExtendedCommand(jc, new HlepCommand(commandHierarchy)); jc.parse(args); if (main.version) { version(); } if (jc.getParsedCommand() == null || main.help) { main.usage(); return; } Command command = (Command)jc.getCommands().get(jc.getParsedCommand()).getObjects().get(0); command.run(); }
@Override public void run() { if (help || input == null || input.isEmpty()) { usage(); return; } try { Smali.assemble(getOptions(), input); } catch (IOException ex) { throw new RuntimeException(ex); } }
@Override public void run() { if (help || input == null || input.isEmpty()) { usage(); return; } try { Smali.assemble(getOptions(), input); } catch (IOException ex) { throw new RuntimeException(ex); } }