|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.avis.util.CommandLineOptions
public abstract class CommandLineOptions
A set of command line options. Subclasses implement
handleArg(Queue)
and checkOptions()
.
Constructor Summary | |
---|---|
CommandLineOptions()
Create a new instance. |
|
CommandLineOptions(String... argv)
Create a new instance and immediately parse an array of command line options and create an option set. |
Method Summary | |
---|---|
static void |
handleError(String appName,
String usage,
Exception ex)
Handle an error in parsing command line options or starting the command line application by printing an error on the console and exiting the VM with an error code. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CommandLineOptions()
handleOptions(String...)
public CommandLineOptions(String... argv) throws IllegalCommandLineOption
argv
- The command line options.
IllegalConfigOptionException
- if an error is detected.
IllegalCommandLineOption
handleOptions(String...)
Method Detail |
---|
public static void handleError(String appName, String usage, Exception ex)
appName
- The application's name.usage
- The command line usage string. The app name will be
appended to this, so this should just include the
options summary plus any detail.ex
- The error that triggered the exit.
IllegalCommandLineOption is handled specially by
printing a usage string.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |