public interface CliObjectFactory<T>
| Modifier and Type | Interface and Description |
|---|---|
static class |
CliObjectFactory.HelpArgumentFound
Thrown if help argument (-h) was found in the app arguments.
|
| Modifier and Type | Method and Description |
|---|---|
T |
buildObject(org.apache.commons.cli.CommandLine cli)
Build an instance of T from the parsed
CommandLine. |
T |
buildObject(String[] args,
int offset,
boolean printUsage,
String usage)
Build an instance of T from the input arguments.
|
org.apache.commons.cli.Options |
getOptions() |
String |
getUsageString()
Get a usage string for display on the command line.
|
org.apache.commons.cli.Options getOptions()
Options understood by this factory.T buildObject(org.apache.commons.cli.CommandLine cli)
CommandLine. The input CommandLine was parsed with
the output of Options, but may include additional Options added by the driver.T buildObject(String[] args, int offset, boolean printUsage, String usage) throws IOException
args - input arguments to the application.offset - will only start processing from this argument number.printUsage - if true, a failure or -h will cause help to be printed and an exception to be thrown.usage - usage String to be printed at the beginning of help message.IOExceptionString getUsageString()