Home » commons-cli-1.1-src » org.apache.commons » cli »


Sub Packages:



CommandLineParser   A class that implements the CommandLineParser interface can parse a String array according to the Options specified and return a CommandLine code | html

Abstract Classes:


Parser creates CommandLine s.

code | html



Thrown when more than one option in an option group has been provided.

code | html
BasicParser   The class BasicParser provides a very simple implementation of the flatten method.  code | html

Represents list of arguments parsed against a Options descriptor.

It allows querying of a boolean #hasOption(String opt) , in addition to retrieving the #getOptionValue(String opt) for options requiring arguments.

Additionally, any left-over or unrecognized arguments, are available for further processing.

code | html
GnuParser   The class GnuParser provides an implementation of the flatten method.  code | html
HelpFormatter   A formatter of help messages for the current command line options  code | html

This class implements the Comparator interface for comparing Options.

code | html
HelpFormatterExamples   A sample program shpwing the use of Options and the HelpFormatter class  code | html

Thrown when an option requiring an argument is not provided with an argument.

code | html

Thrown when a required option has not been provided.

code | html

Describes a single command-line option. 

code | html

OptionBuilder allows the user to create Options using descriptive methods.

Details on the Builder pattern can be found at http://c2.com/cgi-bin/wiki?BuilderPattern.

code | html
OptionGroup   A group of mutually exclusive options.  code | html
OptionValidator   Validates an Option string.  code | html

Main entry-point into the library.

Options represents a collection of Option objects, which describe the possible options for a command-line.

It may flexibly parse long and short options, with or without values. 

code | html

Base for Exceptions thrown during parsing of a command-line.

code | html

Allows Options to be created from a single String. 

code | html
PosixParser   The class PosixParser provides an implementation of the flatten method.  code | html
TypeHandler   This is a temporary implementation.  code | html

Exception thrown during parsing signalling an unrecognized option was seen.


code | html
Util   Contains useful helper methods for classes within this package.  code | html

All Test Cases:


This is a collection of tests that test real world applications command lines. 

code | html
BugsTest     code | html
BuildTest     code | html
GnuParseTest     code | html
OptionBuilderTest     code | html
OptionGroupTest     code | html
ParseRequiredTest     code | html
ParseTest     code | html
PatternOptionBuilderTest   Test case for the PatternOptionBuilder class  code | html
TestHelpFormatter   Test case for the HelpFormatter class  code | html
ValueTest     code | html
ValuesTest     code | html