Interface OptionParser
-
- All Known Implementing Classes:
DefaultOptionParser
public interface OptionParserA class that implements thisOptionParserinterface can parse a String array according to theOptionsspecified and return aParsedOptions.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ParsedOptionsparse(Options options, java.lang.String[] arguments)Parse the arguments according to the specified options.ParsedOptionsparse(Options options, java.lang.String[] arguments, boolean stopAtNonOption)Parse the arguments according to the specified options.ParsedOptionsparse(Options options, java.lang.String[] arguments, java.util.Properties properties)Parse the arguments according to the specified options and properties.ParsedOptionsparse(Options options, java.lang.String[] arguments, java.util.Properties properties, boolean stopAtNonOption)Parse the arguments according to the specified options and properties.
-
-
-
Method Detail
-
parse
ParsedOptions parse(Options options, java.lang.String[] arguments) throws OptionParserException
Parse the arguments according to the specified options.- Parameters:
options- the specified Optionsarguments- the command line arguments- Returns:
- the list of atomic option and value tokens
- Throws:
OptionParserException- if there are any problems encountered while parsing the command line tokens
-
parse
ParsedOptions parse(Options options, java.lang.String[] arguments, java.util.Properties properties) throws OptionParserException
Parse the arguments according to the specified options and properties.- Parameters:
options- the specified Optionsarguments- the command line argumentsproperties- command line option name-value pairs- Returns:
- the list of atomic option and value tokens
- Throws:
OptionParserException- if there are any problems encountered while parsing the command line tokens
-
parse
ParsedOptions parse(Options options, java.lang.String[] arguments, boolean stopAtNonOption) throws OptionParserException
Parse the arguments according to the specified options.- Parameters:
options- the specified Optionsarguments- the command line argumentsstopAtNonOption- iftruean unrecognized argument stops the parsing and the remaining arguments are added to theParsedOptionss args list. Iffalsean unrecognized argument triggers a ParseException.- Returns:
- the list of atomic option and value tokens
- Throws:
OptionParserException- if there are any problems encountered while parsing the command line tokens
-
parse
ParsedOptions parse(Options options, java.lang.String[] arguments, java.util.Properties properties, boolean stopAtNonOption) throws OptionParserException
Parse the arguments according to the specified options and properties.- Parameters:
options- the specified Optionsarguments- the command line argumentsproperties- command line option name-value pairsstopAtNonOption- iftruean unrecognized argument stops the parsing and the remaining arguments are added to theParsedOptionss args list. Iffalsean unrecognized argument triggers a ParseException.- Returns:
- the list of atomic option and value tokens
- Throws:
OptionParserException- if there are any problems encountered while parsing the command line tokens
-
-