BasicParser, DefaultParser, GnuParser, Parser, PosixParserpublic interface CommandLineParser
CommandLineParser interface
can parse a String array according to the Options specified
and return a CommandLine.| Modifier and Type | Method | Description |
|---|---|---|
CommandLine |
parse(Options options,
java.lang.String[] arguments) |
Parse the arguments according to the specified options.
|
CommandLine |
parse(Options options,
java.lang.String[] arguments,
boolean stopAtNonOption) |
Parse the arguments according to the specified options.
|
CommandLine parse(Options options, java.lang.String[] arguments) throws ParseException
options - the specified Optionsarguments - the command line argumentsParseException - if there are any problems encountered
while parsing the command line tokens.CommandLine parse(Options options, java.lang.String[] arguments, boolean stopAtNonOption) throws ParseException
options - the specified Optionsarguments - the command line argumentsstopAtNonOption - if true an unrecognized argument stops
the parsing and the remaining arguments are added to the
CommandLines args list. If false an unrecognized
argument triggers a ParseException.ParseException - if there are any problems encountered
while parsing the command line tokens.