@Override public void validateInput(String args[]) throws Exception { if (args.length < 2) { engine.inputMessage(); Miscellaneous.exit(); } }
@Override public void init(String args[]) throws Exception { String superArgs[] = null; StatsHolder.getInstanceOf().addStatArgs(args); engine.setDefaults(); try { superArgs = engine.processArgs(args); } catch (Exception d) { engine.inputMessage(); // Miscellaneous.printlnErr("************ ERROR Wrong input: " + d.getMessage()); // d.printStackTrace(); Miscellaneous.exit(); } // do not forget this. However, at the end as third parameter was set above properly super.init(superArgs); System.arraycopy(superArgs, 0, args, 0, args.length); }
@Override public void execute(String args[]) throws Exception { try { statHolder.addStat( StatGroups.BYTECODE_OPTIMIZATION, "Total size of all instructions ", CodeAtt.getCodeTotalLengthInput()); super.execute(args); if (!doOptimization) { return; } InputOptionsController.getInstanceOf().execute(); endWithOptimization = true; Oracle.getInstanceOf().updateAllCodeAttsLength(); } catch (Exception d) { d.printStackTrace(); Miscellaneous.exit(); } }