Package | Description |
---|---|
org.apache.commons.cli |
Apache Commons CLI provides a simple API for presenting, processing and validating a Command Line Interface.
|
Modifier and Type | Class and Description |
---|---|
class |
AlreadySelectedException
Thrown when more than one option in an option group has been provided.
|
class |
AmbiguousOptionException
Exception thrown when an option can't be identified from a partial name.
|
class |
MissingArgumentException
Thrown when an option requiring an argument is not provided with an argument.
|
class |
MissingOptionException
Thrown when a required option has not been provided.
|
class |
UnrecognizedOptionException
Thrown during parsing signaling an unrecognized option.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.Class<?> |
TypeHandler.createClass(java.lang.String classname)
Returns the class whose name is
classname . |
static java.lang.Number |
TypeHandler.createNumber(java.lang.String str)
Create a number from a String.
|
static java.lang.Object |
TypeHandler.createObject(java.lang.String classname)
Create an Object from the classname and empty constructor.
|
static java.net.URL |
TypeHandler.createURL(java.lang.String str)
Returns the URL represented by
str . |
static <T> T |
TypeHandler.createValue(java.lang.String str,
java.lang.Class<T> clazz)
Returns the
Object of type clazz with the value of str . |
static java.lang.Object |
TypeHandler.createValue(java.lang.String str,
java.lang.Object obj)
Returns the
Object of type obj with the value of str . |
protected abstract java.lang.String[] |
Parser.flatten(Options opts,
java.lang.String[] arguments,
boolean stopAtNonOption)
Deprecated.
Subclasses must implement this method to reduce the
arguments that have been passed to the parse method. |
protected java.lang.String[] |
PosixParser.flatten(Options options,
java.lang.String[] arguments,
boolean stopAtNonOption)
Deprecated.
|
java.lang.Object |
CommandLine.getParsedOptionValue(char opt)
Return a version of this
Option converted to a particular type. |
java.lang.Object |
CommandLine.getParsedOptionValue(Option option)
Return a version of this
Option converted to a particular type. |
java.lang.Object |
CommandLine.getParsedOptionValue(java.lang.String opt)
Return a version of this
Option converted to a particular type. |
protected void |
DefaultParser.handleConcatenatedOptions(java.lang.String token)
Breaks
token into its constituent parts using the following algorithm. |
static java.io.FileInputStream |
TypeHandler.openFile(java.lang.String str)
Returns the opened FileInputStream represented by
str . |
CommandLine |
CommandLineParser.parse(Options options,
java.lang.String[] arguments)
Parses the arguments according to the specified options.
|
CommandLine |
DefaultParser.parse(Options options,
java.lang.String[] arguments) |
CommandLine |
Parser.parse(Options options,
java.lang.String[] arguments)
Deprecated.
Parses the specified
arguments based on the specified Options . |
CommandLine |
CommandLineParser.parse(Options options,
java.lang.String[] arguments,
boolean stopAtNonOption)
Parses the arguments according to the specified options.
|
CommandLine |
DefaultParser.parse(Options options,
java.lang.String[] arguments,
boolean stopAtNonOption) |
CommandLine |
Parser.parse(Options options,
java.lang.String[] arguments,
boolean stopAtNonOption)
Deprecated.
Parses the specified
arguments based on the specified Options . |
CommandLine |
DefaultParser.parse(Options options,
java.lang.String[] arguments,
java.util.Properties properties)
Parses the arguments according to the specified options and properties.
|
CommandLine |
Parser.parse(Options options,
java.lang.String[] arguments,
java.util.Properties properties)
Deprecated.
Parse the arguments according to the specified options and properties.
|
CommandLine |
DefaultParser.parse(Options options,
java.lang.String[] arguments,
java.util.Properties properties,
boolean stopAtNonOption)
Parses the arguments according to the specified options and properties.
|
CommandLine |
Parser.parse(Options options,
java.lang.String[] arguments,
java.util.Properties properties,
boolean stopAtNonOption)
Deprecated.
Parse the arguments according to the specified options and properties.
|
void |
Parser.processArgs(Option opt,
java.util.ListIterator<java.lang.String> iter)
Deprecated.
Process the argument values for the specified Option
opt using the values retrieved from the specified
iterator iter . |
protected void |
Parser.processOption(java.lang.String arg,
java.util.ListIterator<java.lang.String> iter)
Deprecated.
Process the Option specified by
arg using the values retrieved from the specified iterator
iter . |
protected void |
Parser.processProperties(java.util.Properties properties)
Deprecated.
Sets the values of Options using the values in
properties . |