Package org.apache.commons.cli
Apache Commons CLI provides a simple API for presenting, processing, and validating a Command Line Interface.
-
Interface Summary Interface Description CommandLineParser A class that implements theCommandLineParserinterface can parse a String array according to theOptionsspecified and return aCommandLine.Converter<T,E extends java.lang.Exception> The definition of the functional interface to call when doing a conversion. -
Class Summary Class Description BasicParser Deprecated. since 1.3, use theDefaultParserinsteadCommandLine Represents list of arguments parsed against aOptionsdescriptor.CommandLine.Builder A nested builder class to createCommandLineinstance using descriptive methods.DefaultParser Default parser.DefaultParser.Builder A nested builder class to createDefaultParserinstances using descriptive methods.DeprecatedAttributes Deprecated attributes.DeprecatedAttributes.Builder BuildsDeprecatedAttributes.GnuParser Deprecated. since 1.3, use theDefaultParserinsteadHelpFormatter Deprecated. UseHelpFormatter.HelpFormatter.Builder BuildsHelpFormatter.Option Describes a single command-line option.Option.Builder BuildsOptioninstances using descriptive methods.OptionBuilder Deprecated. since 1.3, useOption.builder(String)insteadOptionGroup A group of mutually exclusive options.Options Main 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 casesPatternOptionBuilder Allows Options to be created from a single String.PosixParser Deprecated. since 1.3, use theDefaultParserinsteadTypeHandler TypeHandler will handle the pluggable conversion and verification of Option types. -
Enum Summary Enum Description DefaultParser.NonOptionAction Enum representing possible actions that may be done when "non option" is discovered during parsing. -
Exception Summary Exception Description AlreadySelectedException Thrown when more than one option in an option group has been provided.AmbiguousOptionException Exception thrown when an option can't be identified from a partial name.MissingArgumentException Thrown when an option requiring an argument is not provided with an argument.MissingOptionException Thrown when a required option has not been provided.ParseException Base for Exceptions thrown during parsing of a command-line.UnrecognizedOptionException Thrown during parsing signaling an unrecognized option.