|
Cytoscape 2.8.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.cli.avalon.CLArgsParser
public final class CLArgsParser
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().
ParserControl
,
CLOption
,
CLOptionDescriptor
Constructor Summary | |
---|---|
CLArgsParser(String[] args,
CLOptionDescriptor[] optionDescriptors)
Create a parser that deals with options and parses certain args. |
|
CLArgsParser(String[] args,
CLOptionDescriptor[] optionDescriptors,
ParserControl control)
Create a parser that can deal with options and parses certain args. |
Method Summary | |
---|---|
CLOption |
getArgumentById(int id)
Retrieve the CLOption with specified id, or
null if no command line option is found. |
CLOption |
getArgumentByName(String name)
Retrieve the CLOption with specified name, or
null if no command line option is found. |
Vector |
getArguments()
Retrieve a list of options that were parsed from command list. |
String |
getErrorString()
Retrieve an error message that occured during parsing if one existed. |
String[] |
getUnparsedArgs()
Retrieve an array of arguments that have not been parsed due to the parser halting. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CLArgsParser(String[] args, CLOptionDescriptor[] optionDescriptors, ParserControl control)
args
- the args, typically that passed to the
public static void main(String[] args)
method.optionDescriptors
- the option descriptorscontrol
- the parser control used determine behaviour of parserpublic CLArgsParser(String[] args, CLOptionDescriptor[] optionDescriptors)
args
- the argsoptionDescriptors
- the option descriptorsMethod Detail |
---|
public final String[] getUnparsedArgs()
public final Vector getArguments()
public final CLOption getArgumentById(int id)
CLOption
with specified id, or
null
if no command line option is found.
id
- the command line option id
CLOption
with the specified id, or
null
if no CLOption is found.CLOption
public final CLOption getArgumentByName(String name)
CLOption
with specified name, or
null
if no command line option is found.
name
- the command line option name
CLOption
with the specified name, or
null
if no CLOption is found.CLOption
public final String getErrorString()
|
Cytoscape 2.8.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |