Apache Commons CLI provides a simple API for presenting, processing and validating a command line interface.
Interface Summary Interface Description CommandLineParser
Class Summary Class Description BasicParser Deprecated. CommandLineRepresents list of arguments parsed against a
CommandLine.BuilderA nested builder class to create
CommandLineinstance using descriptive methods.
DefaultParserDefault parser. GnuParser Deprecated. HelpFormatterA formatter of help messages for command line options. OptionDescribes a single command-line option. Option.BuilderA nested builder class to create
Optioninstances using descriptive methods.
OptionBuilder Deprecated.since 1.3, use
OptionGroupA group of mutually exclusive options. OptionsMain entry-point into the library. Parser Deprecated.since 1.3, the two-pass parsing with the flatten method is not enough flexible to handle complex cases PatternOptionBuilderAllows Options to be created from a single String. PosixParser Deprecated. TypeHandlerThis is a temporary implementation.
Exception Summary Exception Description AlreadySelectedExceptionThrown when more than one option in an option group has been provided. AmbiguousOptionExceptionException thrown when an option can't be identified from a partial name. MissingArgumentExceptionThrown when an option requiring an argument is not provided with an argument. MissingOptionExceptionThrown when a required option has not been provided. ParseExceptionBase for Exceptions thrown during parsing of a command-line. UnrecognizedOptionExceptionException thrown during parsing signalling an unrecognized option was seen.