| java.lang.Object org.apache.commons.cli.avalon.CLArgsParser
CLArgsParser | final public class CLArgsParser (Code) | | Parser for command line arguments.
This parses command lines according to the standard (?) of GNU utilities.
Note: This is still used in 1.1 libraries so do not add 1.2+ dependencies.
Note that CLArgs uses a backing hashtable for the options index and so
duplicate arguments are only returned by getArguments().
See Also: ParserControl See Also: CLOption See Also: CLOptionDescriptor |
CLArgsParser | public CLArgsParser(String[] args, CLOptionDescriptor[] optionDescriptors, ParserControl control)(Code) | | Create a parser that can deal with options and parses certain args.
Parameters: args - the args, typically that passed to thepublic static void main(String[] args) method. Parameters: optionDescriptors - the option descriptors Parameters: control - the parser control used determine behaviour of parser |
CLArgsParser | public CLArgsParser(String[] args, CLOptionDescriptor[] optionDescriptors)(Code) | | Create a parser that deals with options and parses certain args.
Parameters: args - the args Parameters: optionDescriptors - the option descriptors |
getArgumentById | final public CLOption getArgumentById(int id)(Code) | | Retrieve the
CLOption with specified id, or null
if no command line option is found.
Parameters: id - the command line option id the CLOption with the specified id, or null if no CLOption is found. See Also: CLOption |
getArgumentByName | final public CLOption getArgumentByName(String name)(Code) | | Retrieve the
CLOption with specified name, or null
if no command line option is found.
Parameters: name - the command line option name the CLOption with the specified name, ornull if no CLOption is found. See Also: CLOption |
getArguments | final public Vector getArguments()(Code) | | Retrieve a list of options that were parsed from command list.
the list of options |
getErrorString | final public String getErrorString()(Code) | | Retrieve an error message that occured during parsing if one existed.
the error string |
getUnparsedArgs | final public String[] getUnparsedArgs()(Code) | | Retrieve an array of arguments that have not been parsed due to the
parser halting.
an array of unparsed args |
|
|