| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.cli.Parser
Parser creates CommandLines.
Parser| Constructor Summary | |
| Parser() | |
| Method Summary | |
| protected abstract  String[] | flatten(Options opts,
        String[] arguments,
        boolean stopAtNonOption)Subclasses must implement this method to reduce the argumentsthat have been passed to the parse 
 method. | 
|  CommandLine | parse(Options options,
      String[] arguments)Parses the specified argumentsbased on the specifedOptions. | 
|  CommandLine | parse(Options options,
      String[] arguments,
      boolean stopAtNonOption)Parses the specified argumentsbased on the specifedOptions. | 
|  CommandLine | parse(Options options,
      String[] arguments,
      Properties properties)Parse the arguments according to the specified options and properties. | 
|  CommandLine | parse(Options options,
      String[] arguments,
      Properties properties,
      boolean stopAtNonOption)Parse the arguments according to the specified options and properties. | 
|  void | processArgs(Option opt,
            ListIterator iter)Process the argument values for the specified Option optusing the values retrieved from the 
 specified iteratoriter. | 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
public Parser()
| Method Detail | 
protected abstract String[] flatten(Options opts,
                                    String[] arguments,
                                    boolean stopAtNonOption)
Subclasses must implement this method to reduce
 the arguments that have been passed to the parse 
 method.
opts - The Options to parse the arguments by.arguments - The arguments that have to be flattened.stopAtNonOption - specifies whether to stop 
 flattening when a non option has been encountered
public CommandLine parse(Options options,
                         String[] arguments)
                  throws ParseException
Parses the specified arguments 
 based on the specifed Options.
parse in interface CommandLineParseroptions - the Optionsarguments - the arguments
CommandLine
ParseException - if an error occurs when parsing the
 arguments.
public CommandLine parse(Options options,
                         String[] arguments,
                         Properties properties)
                  throws ParseException
options - the specified Optionsarguments - the command line argumentsproperties - command line option name-value pairs
ParseException - if there are any problems encountered
 while parsing the command line tokens.
public CommandLine parse(Options options,
                         String[] arguments,
                         boolean stopAtNonOption)
                  throws ParseException
Parses the specified arguments 
 based on the specifed Options.
parse in interface CommandLineParseroptions - the Optionsarguments - the argumentsstopAtNonOption - specifies whether to stop 
 interpreting the arguments when a non option has 
 been encountered and to add them to the CommandLines
 args list.
CommandLine
ParseException - if an error occurs when parsing the
 arguments.
public CommandLine parse(Options options,
                         String[] arguments,
                         Properties properties,
                         boolean stopAtNonOption)
                  throws ParseException
options - the specified Optionsarguments - the command line argumentsproperties - command line option name-value pairsstopAtNonOption - stop parsing the arguments when the first
 non option is encountered.
ParseException - if there are any problems encountered
 while parsing the command line tokens.
public void processArgs(Option opt,
                        ListIterator iter)
                 throws ParseException
Process the argument values for the specified Option
 opt using the values retrieved from the 
 specified iterator iter.
opt - The current Optioniter - The iterator over the flattened command line
 Options.
ParseException - if an argument value is required
 and it is has not been found.| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||