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.
|
Map<Option,Object> |
getOptions() |
String[] |
getRawArguments() |
List<String> |
getRemainingArgs() |
String |
getRemainingArgsString() |
String |
getRemainingArgsWithOptionsString() |
Properties |
getSystemProperties() |
Map<String,Object> |
getUndeclaredOptions() |
boolean |
hasOption(String name) |
Map.Entry<String,Object> |
lastOption() |
Object |
optionValue(String name)
The value of an option.
|
static CommandLine |
parse(String... args)
Parse a new command line with the default options.
|
CommandLine |
parseNew(String[] args)
Parses a new
CommandLine instance that combines this instance with the given arguments. |
List<String> getRemainingArgs()
Properties getSystemProperties()
boolean hasOption(String name)
name
- The name of the optionObject optionValue(String name)
name
- The optionString getRemainingArgsString()
String getRemainingArgsWithOptionsString()
CommandLine parseNew(String[] args)
CommandLine
instance that combines this instance with the given arguments.args
- The argumentsCommandLine
instanceString[] getRawArguments()
static CommandLine.Builder build()
static CommandLine parse(String... args)
args
- The arguments