| java.lang.Object org.apache.commons.cli.Parser
All known Subclasses: org.apache.commons.cli.BasicParser, org.apache.commons.cli.GnuParser, org.apache.commons.cli.PosixParser,
Method Summary | |
abstract protected String[] | flatten(Options opts, String[] arguments, boolean stopAtNonOption) | public CommandLine | parse(Options options, String[] arguments) | public CommandLine | parse(Options options, String[] arguments, Properties properties) Parse the arguments according to the specified options and
properties. | public CommandLine | parse(Options options, String[] arguments, boolean stopAtNonOption) Parses the specified arguments
based on the specifed
Options .
Parameters: options - the Options Parameters: arguments - the arguments Parameters: stopAtNonOption - specifies whether to stop interpreting the arguments when a non option has been encountered and to add them to the CommandLinesargs list. | public CommandLine | parse(Options options, String[] arguments, Properties properties, boolean stopAtNonOption) Parse the arguments according to the specified options and
properties.
Parameters: options - the specified Options Parameters: arguments - the command line arguments Parameters: properties - command line option name-value pairs Parameters: stopAtNonOption - stop parsing the arguments when the firstnon option is encountered. | public void | processArgs(Option opt, ListIterator iter) Process the argument values for the specified Option
opt using the values retrieved from the
specified iterator iter . |
flatten | abstract protected String[] flatten(Options opts, String[] arguments, boolean stopAtNonOption)(Code) | | Subclasses must implement this method to reduce
the arguments that have been passed to the parse
method.
Parameters: opts - The Options to parse the arguments by. Parameters: arguments - The arguments that have to be flattened. Parameters: stopAtNonOption - specifies whether to stop flattening when a non option has been encountered a String array of the flattened arguments |
parse | public CommandLine parse(Options options, String[] arguments, Properties properties) throws ParseException(Code) | | Parse the arguments according to the specified options and
properties.
Parameters: options - the specified Options Parameters: arguments - the command line arguments Parameters: properties - command line option name-value pairs the list of atomic option and value tokens throws: ParseException - if there are any problems encounteredwhile parsing the command line tokens. |
parse | public CommandLine parse(Options options, String[] arguments, boolean stopAtNonOption) throws ParseException(Code) | | Parses the specified arguments
based on the specifed
Options .
Parameters: options - the Options Parameters: arguments - the arguments Parameters: stopAtNonOption - specifies whether to stop interpreting the arguments when a non option has been encountered and to add them to the CommandLinesargs list. the CommandLine throws: ParseException - if an error occurs when parsing thearguments. |
parse | public CommandLine parse(Options options, String[] arguments, Properties properties, boolean stopAtNonOption) throws ParseException(Code) | | Parse the arguments according to the specified options and
properties.
Parameters: options - the specified Options Parameters: arguments - the command line arguments Parameters: properties - command line option name-value pairs Parameters: stopAtNonOption - stop parsing the arguments when the firstnon option is encountered. the list of atomic option and value tokens throws: ParseException - if there are any problems encounteredwhile parsing the command line tokens. |
processArgs | public void processArgs(Option opt, ListIterator iter) throws ParseException(Code) | | Process the argument values for the specified Option
opt using the values retrieved from the
specified iterator iter .
Parameters: opt - The current Option Parameters: iter - The iterator over the flattened command lineOptions. throws: ParseException - if an argument value is requiredand it is has not been found. |
|
|