public interface CommandLine
Modifier and Type | Interface and Description |
---|---|
static interface |
CommandLine.Builder<T extends CommandLine.Builder>
A build for constructing a command line parser.
|
Modifier and Type | Method and Description |
---|---|
static CommandLine.Builder |
build()
Build and parse a new command line.
|
java.util.Map<Option,java.lang.Object> |
getOptions() |
java.lang.String[] |
getRawArguments() |
java.util.List<java.lang.String> |
getRemainingArgs() |
java.lang.String |
getRemainingArgsString() |
java.lang.String |
getRemainingArgsWithOptionsString() |
java.util.Properties |
getSystemProperties() |
java.util.Map<java.lang.String,java.lang.Object> |
getUndeclaredOptions() |
boolean |
hasOption(java.lang.String name) |
java.util.Map.Entry<java.lang.String,java.lang.Object> |
lastOption() |
java.lang.Object |
optionValue(java.lang.String name)
The value of an option.
|
static CommandLine |
parse(java.lang.String... args)
Parse a new command line with the default options.
|
CommandLine |
parseNew(java.lang.String[] args)
Parses a new
CommandLine instance that combines this instance with the given arguments. |
java.util.List<java.lang.String> getRemainingArgs()
java.util.Properties getSystemProperties()
java.util.Map<Option,java.lang.Object> getOptions()
boolean hasOption(java.lang.String name)
name
- The name of the optionjava.lang.Object optionValue(java.lang.String name)
name
- The optionjava.util.Map.Entry<java.lang.String,java.lang.Object> lastOption()
java.lang.String getRemainingArgsString()
java.lang.String getRemainingArgsWithOptionsString()
java.util.Map<java.lang.String,java.lang.Object> getUndeclaredOptions()
CommandLine parseNew(java.lang.String[] args)
CommandLine
instance that combines this instance with the given arguments.args
- The argumentsCommandLine
instancejava.lang.String[] getRawArguments()
static CommandLine.Builder build()
static CommandLine parse(java.lang.String... args)
args
- The arguments