DefaultOptionParserpublic interface OptionParser
OptionParser interface
can parse a String array according to the Options specified
and return a ParsedOptions.| Modifier and Type | Method | Description |
|---|---|---|
ParsedOptions |
parse(Options options,
java.lang.String[] arguments) |
Parse the arguments according to the specified options.
|
ParsedOptions |
parse(Options options,
java.lang.String[] arguments,
boolean stopAtNonOption) |
Parse the arguments according to the specified options.
|
ParsedOptions |
parse(Options options,
java.lang.String[] arguments,
java.util.Properties properties) |
Parse the arguments according to the specified options and
properties.
|
ParsedOptions |
parse(Options options,
java.lang.String[] arguments,
java.util.Properties properties,
boolean stopAtNonOption) |
Parse the arguments according to the specified options and
properties.
|
ParsedOptions parse(Options options, java.lang.String[] arguments) throws OptionParserException
options - the specified Optionsarguments - the command line argumentsOptionParserException - if there are any problems encountered
while parsing the command line tokensParsedOptions parse(Options options, java.lang.String[] arguments, java.util.Properties properties) throws OptionParserException
options - the specified Optionsarguments - the command line argumentsproperties - command line option name-value pairsOptionParserException - if there are any problems encountered
while parsing the command line tokensParsedOptions parse(Options options, java.lang.String[] arguments, boolean stopAtNonOption) throws OptionParserException
options - the specified Optionsarguments - the command line argumentsstopAtNonOption - if true an unrecognized argument stops
the parsing and the remaining arguments are added to the
ParsedOptionss args list. If false an unrecognized
argument triggers a ParseException.OptionParserException - if there are any problems encountered
while parsing the command line tokensParsedOptions parse(Options options, java.lang.String[] arguments, java.util.Properties properties, boolean stopAtNonOption) throws OptionParserException
options - the specified Optionsarguments - the command line argumentsproperties - command line option name-value pairsstopAtNonOption - if true an unrecognized argument stops
the parsing and the remaining arguments are added to the
ParsedOptionss args list. If false an unrecognized
argument triggers a ParseException.OptionParserException - if there are any problems encountered
while parsing the command line tokensCopyright © 2008–2017 The Aspectran Project. All rights reserved.