/** * returns the default options the default OptionHandler will return * * @return the default options */ protected String[] getDefaultOptions() { String[] result; OptionHandler o; o = getDefaultHandler(); if (o == null) { println("WARNING: couldn't create default handler, cannot use default options!"); result = new String[0]; } else { result = o.getOptions(); } return result; }
/** * returns the default options the default OptionHandler will return * * @return the default options */ protected String[] getDefaultOptions() { String[] result; OptionHandler o; o = getDefaultHandler(); if (o == null) { println("WARNING: couldn't create default handler, cannot use default options!"); result = new String[0]; } else { result = o.getOptions(); } return result; }
/** * checks whether the user-supplied options can be processed at all * * @return index 0 is true if the test was passed, index 1 is always false */ public boolean checkSetOptions() { boolean result; print("SetOptions..."); try { getDefaultHandler().setOptions(getUserOptions()); println("yes"); result = true; } catch (Exception e) { println("no"); result = false; if (getDebug()) { println(e); } } return result; }
/** * checks whether the user-supplied options can be processed at all * * @return index 0 is true if the test was passed, index 1 is always false */ public boolean checkSetOptions() { boolean result; print("SetOptions..."); try { getDefaultHandler().setOptions(getUserOptions()); println("yes"); result = true; } catch (Exception e) { println("no"); result = false; if (getDebug()) { println(e); } } return result; }
/** * checks whether the default options can be processed completely or some * invalid options are returned by the getOptions() method. * * @return index 0 is true if the test was passed, index 1 is always false */ public boolean checkDefaultOptions() { boolean result; String[] options; print("Default options..."); options = getDefaultOptions(); try { getDefaultHandler().setOptions(options); Utils.checkForRemainingOptions(options); println("yes"); result = true; } catch (Exception e) { println("no"); result = false; if (getDebug()) { println(e); } } return result; }
/** * checks whether the default options can be processed completely or some * invalid options are returned by the getOptions() method. * * @return index 0 is true if the test was passed, index 1 is always false */ public boolean checkDefaultOptions() { boolean result; String[] options; print("Default options..."); options = getDefaultOptions(); try { getDefaultHandler().setOptions(options); Utils.checkForRemainingOptions(options); println("yes"); result = true; } catch (Exception e) { println("no"); result = false; if (getDebug()) { println(e); } } return result; }
/** * checks whether the user-supplied options can be processed completely or * some "left-over" options remain * * @return index 0 is true if the test was passed, index 1 is always false */ public boolean checkRemainingOptions() { boolean result; String[] options; print("Remaining options..."); options = getUserOptions(); try { getDefaultHandler().setOptions(options); if (getDebug()) { println("\n remaining: " + printOptions(options)); } println("yes"); result = true; } catch (Exception e) { println("no"); result = false; if (getDebug()) { println(e); } } return result; }
/** * checks whether the user-supplied options can be processed completely or * some "left-over" options remain * * @return index 0 is true if the test was passed, index 1 is always false */ public boolean checkRemainingOptions() { boolean result; String[] options; print("Remaining options..."); options = getUserOptions(); try { getDefaultHandler().setOptions(options); if (getDebug()) { println("\n remaining: " + printOptions(options)); } println("yes"); result = true; } catch (Exception e) { println("no"); result = false; if (getDebug()) { println(e); } } return result; }
println("\n Setting user options"); handler = getDefaultHandler(); handler.setOptions(getUserOptions()); defaultOptions = getDefaultOptions();
println("\n Setting user options"); handler = getDefaultHandler(); handler.setOptions(getUserOptions()); defaultOptions = getDefaultOptions();
handler = getDefaultHandler(); handler.setOptions(getUserOptions()); if (getDebug()) {
handler = getDefaultHandler(); handler.setOptions(getUserOptions()); if (getDebug()) {