/** * Determines whether this Server launcher command has the specified command-line option. * * @param option a String indicating the name of the command-line option to this command. * @return a boolean value indicating whether this command has the specified named command-line * option. */ public boolean hasOption(final String option) { return getOptions().contains(lowerCase(option)); }
/** * Displays help for the specified Server launcher command to standard err. If the Server launcher * command is unspecified, then usage information is displayed instead. * * @param command the Server launcher command in which to display help information. * @see #usage() */ public void help(final Command command) { if (Command.isUnspecified(command)) { usage(); } else { info(wrap(helpMap.get(command.getName()), 80, "")); info("\n\nusage: \n\n"); info(wrap("> java ... " + getClass().getName() + ' ' + usageMap.get(command), 80, "\t\t")); info("\n\noptions: \n\n"); for (final String option : command.getOptions()) { info(wrap("--" + option + ": " + helpMap.get(option) + '\n', 80, "\t")); } info("\n\n"); } }