/** * Parses the given commandline parameters and generates the Javadoc. * * @param args the commandline parameters for the object */ public static void main(String[] args) { runJavadoc(new OptionHandlerJavadoc(), args); } }
if (!canInstantiateClass()) { return result; if (!InheritanceUtils.hasInterface(OptionHandler.class, getInstance() .getClass())) { throw new Exception("Class '" + getClassname() + "' is not an OptionHandler!"); handler = (OptionHandler) getInstance(); Enumeration<Option> enm = handler.listOptions(); if (!enm.hasMoreElements()) { if (getProlog()) { result = "Valid options are: <p>\n\n"; while (enm.hasMoreElements()) { Option option = enm.nextElement(); optionStr = toHTML(option.synopsis()) + "\n" + toHTML(option.description().replaceAll("\\t", " ")); result += "<pre> " + optionStr.replaceAll("<br>", "") + "</pre>\n\n"; if (getUseStars()) { result = indent(result, 1, "* ");
/** * Parses a given list of options. * * @param options the list of options as an array of strings * @throws Exception if an option is not supported */ @Override public void setOptions(String[] options) throws Exception { super.setOptions(options); setProlog(!Utils.getFlag("noprolog", options)); }
/** * Gets the current settings of this object. * * @return an array of strings suitable for passing to setOptions */ @Override public String[] getOptions() { Vector<String> result = new Vector<String>(); Collections.addAll(result, super.getOptions()); if (!getProlog()) { result.add("-noprolog"); } return result.toArray(new String[result.size()]); }
if (!canInstantiateClass()) { return result; if (!InheritanceUtils.hasInterface(OptionHandler.class, getInstance() .getClass())) { throw new Exception("Class '" + getClassname() + "' is not an OptionHandler!"); handler = (OptionHandler) getInstance(); Enumeration<Option> enm = handler.listOptions(); if (!enm.hasMoreElements()) { if (getProlog()) { result = "Valid options are: <p>\n\n"; while (enm.hasMoreElements()) { Option option = enm.nextElement(); optionStr = toHTML(option.synopsis()) + "\n" + toHTML(option.description().replaceAll("\\t", " ")); result += "<pre> " + optionStr.replaceAll("<br>", "") + "</pre>\n\n"; if (getUseStars()) { result = indent(result, 1, "* ");
/** * Parses a given list of options. * * @param options the list of options as an array of strings * @throws Exception if an option is not supported */ @Override public void setOptions(String[] options) throws Exception { super.setOptions(options); setProlog(!Utils.getFlag("noprolog", options)); }
/** * Gets the current settings of this object. * * @return an array of strings suitable for passing to setOptions */ @Override public String[] getOptions() { Vector<String> result = new Vector<String>(); Collections.addAll(result, super.getOptions()); if (!getProlog()) { result.add("-noprolog"); } return result.toArray(new String[result.size()]); }
/** * Parses the given commandline parameters and generates the Javadoc. * * @param args the commandline parameters for the object */ public static void main(String[] args) { runJavadoc(new OptionHandlerJavadoc(), args); } }