|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.fuin.kickstart4j.CmdLineParser
public final class CmdLineParser
Parses the command line and set the appropriate config object values.
| Constructor Summary | |
|---|---|
CmdLineParser(Locale locale)
Constructor with locale. |
|
| Method Summary | |
|---|---|
void |
copyToConfig(Config config)
Copy the parsed values to the configuration. |
String |
get(String key)
Returns an option value by it's key. |
static void |
main(String[] args)
Test method. |
void |
parse(String[] args)
Parse the command line and set the values in the target config object. |
void |
printUsage(OutputStream out)
Prints the command line usage. |
void |
printUsage(PrintStream ps)
Prints the command line usage. |
String |
remove(String key)
Removes an option key. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CmdLineParser(Locale locale)
locale - Locale.| Method Detail |
|---|
public final void parse(String[] args)
throws CmdLineException
args - Command line arguments.
CmdLineException - Illegal arguments or missing required arguments.public String get(String key)
key - Key to find.
null if the key was not found.public String remove(String key)
key - Option to remove.
public void copyToConfig(Config config)
config - Config to fill with parsed values.public final void printUsage(PrintStream ps)
ps - Stream to use.public final void printUsage(OutputStream out)
out - Stream to use.public final String toString()
toString in class Objectpublic static void main(String[] args)
args - Not used.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||