Package org.apache.commons.cli
Interface CommandLineParser
-
- All Known Implementing Classes:
BasicParser,GnuParser,Parser,PosixParser
public interface CommandLineParser
A class that implements theCommandLineParserinterface can parse a String array according to theOptionsspecified and return aCommandLine.- Version:
- $Revision: 680644 $, $Date: 2008-07-29 01:13:48 -0700 (Tue, 29 Jul 2008) $
- Author:
- John Keyes (john at integralsource.com)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CommandLineparse(Options options, java.lang.String[] arguments)Parse the arguments according to the specified options.CommandLineparse(Options options, java.lang.String[] arguments, boolean stopAtNonOption)Parse the arguments according to the specified options.
-
-
-
Method Detail
-
parse
CommandLine parse(Options options, java.lang.String[] arguments) throws ParseException
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:
ParseException- if there are any problems encountered while parsing the command line tokens.
-
parse
CommandLine parse(Options options, java.lang.String[] arguments, boolean stopAtNonOption) throws ParseException
Parse the arguments according to the specified options.- Parameters:
options- the specified Optionsarguments- the command line argumentsstopAtNonOption- specifies whether to continue parsing the arguments if a non option is encountered.- Returns:
- the list of atomic option and value tokens
- Throws:
ParseException- if there are any problems encountered while parsing the command line tokens.
-
-