/** * Test method for this class * * @param args the commandline parameters */ public static void main(String[] args) { try { CheckEstimator check = new CheckEstimator(); try { check.setOptions(args); Utils.checkForRemainingOptions(args); } catch (Exception ex) { String result = ex.getMessage() + "\n\n" + check.getClass().getName().replaceAll(".*\\.", "") + " Options:\n\n"; Enumeration<Option> enu = check.listOptions(); while (enu.hasMoreElements()) { Option option = enu.nextElement(); result += option.synopsis() + "\n" + option.description() + "\n"; } throw new Exception(result); } check.doTests(); } catch (Exception ex) { System.err.println(ex.getMessage()); } } }
/** * Test method for this class * * @param args the commandline parameters */ public static void main(String[] args) { try { CheckEstimator check = new CheckEstimator(); try { check.setOptions(args); Utils.checkForRemainingOptions(args); } catch (Exception ex) { String result = ex.getMessage() + "\n\n" + check.getClass().getName().replaceAll(".*\\.", "") + " Options:\n\n"; Enumeration<Option> enu = check.listOptions(); while (enu.hasMoreElements()) { Option option = enu.nextElement(); result += option.synopsis() + "\n" + option.description() + "\n"; } throw new Exception(result); } check.doTests(); } catch (Exception ex) { System.err.println(ex.getMessage()); } } }