Interface CommandLine.Builder<T extends CommandLine.Builder>
- Type Parameters:
T- The concrete type of the builder
- Enclosing interface:
CommandLine
public static interface CommandLine.Builder<T extends CommandLine.Builder>
A build for constructing a command line parser.
- Since:
- 1.0
- Author:
- Graeme Rocher
-
Method Summary
Modifier and TypeMethodDescriptionAdd an option.Parses the given list of command line arguments.parseString(String string) Parses a string of all the command line options converting them into an array of arguments to pass to #parse(String...
-
Method Details
-
addOption
-
parseString
Parses a string of all the command line options converting them into an array of arguments to pass to #parse(String... args).- Parameters:
string- The string- Returns:
- The command line
-
parse
Parses the given list of command line arguments. Arguments starting with -D become system properties, arguments starting with -- or - become either declared or undeclared options. All other arguments are put into a list of remaining arguments- Parameters:
args- The arguments- Returns:
- The command line state
-