org.apache.axis.utils
Class CLArgsParser
java.lang.Objectorg.apache.axis.utils.CLArgsParser
public final class CLArgsParser
extends java.lang.Object
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.
- Peter Donald
- 4.0
CLArgsParser
public CLArgsParser(String[] args,
CLOptionDescriptor optionDescriptors) Create a parser that deals with options and parses certain args.
args - the argsoptionDescriptors - the option descriptors
CLArgsParser
public CLArgsParser(String[] args,
CLOptionDescriptor optionDescriptors,
ParserControl control) Create a parser that can deal with options and parses certain args.
args - the args, typically that passed to the
public static void main(String[] args) method.optionDescriptors - the option descriptors
getArgumentById
public final CLOption getArgumentById(int id)
Retrieve the
CLOption with specified id, or
null if no command line option is found.
id - the command line option id
- the
CLOption with the specified id, or
null if no CLOption is found.
CLOption
getArgumentByName
public final CLOption getArgumentByName(String name)
Retrieve the
CLOption with specified name, or
null if no command line option is found.
name - the command line option name
- the
CLOption with the specified name, or
null if no CLOption is found.
CLOption
getArguments
public final Vector getArguments()
Retrieve a list of options that were parsed from command list.
- the list of options
getErrorString
public final String getErrorString()
Retrieve an error message that occured during parsing if one existed.
- the error string
getUnparsedArgs
public final String[] getUnparsedArgs()
Copyright B) 2005 Apache Web Services Project. All Rights Reserved.