public class CmdlineParser extends Object
CmdlineParser cmdline = new CmdlineParser(this); if (!cmdline.processArgs(args)) {
complain about errors, exit, etc.}
Constructor and Description |
---|
CmdlineParser(Object mainClass)
Create a command-line parser.
|
Modifier and Type | Method and Description |
---|---|
void |
addConsumer(CmdlineConsumer consumer)
Add a command-line argument/keyword consumer.
|
String |
getMainClassName()
Get the name of the main class.
|
boolean |
processArgs(String[] args)
Pass all options/keywords on to all
CmdlineConsumer s. |
public CmdlineParser(Object mainClass)
mainClass
- The class in which the main() method lives.public void addConsumer(CmdlineConsumer consumer)
public String getMainClassName()
public boolean processArgs(String[] args)
CmdlineConsumer
s.args
- Array of command-line arguments passed to main() method.Copyright © 1996–2023 The SSEC Visualization Project. All rights reserved.