|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.util.AbstractMap
|
+--java.util.HashMap
|
+--net.larsan.urd.CmdOptions
A simple command line parser class. This class takes the command line arguments and parses them for easier use in the application.
Control,
Serialized Form| Nested Class Summary |
| Nested classes inherited from class java.util.Map |
java.util.Map.Entry |
| Constructor Summary | |
CmdOptions(java.lang.String[] args)
Create options object |
|
| Method Summary | |
java.lang.String |
getAddress()
Get the root address. |
java.io.File |
getConfDir()
Get the config folder path. |
java.io.File |
getLibDir()
Get the library folder path. |
java.lang.String |
getPass()
Get user password. |
int |
getPort()
Get the root address port. |
java.io.File |
getRoot()
Get the framework root. |
java.io.File |
getSystemDir()
Get the system folder path. |
java.lang.String |
getUser()
Get user name. |
boolean |
isVerbose()
Check for versbose option. |
static CmdOptions |
parse(java.lang.String[] args)
Parse an array of arguments into a options object. |
boolean |
printHelp()
Check for help option. |
| Methods inherited from class java.util.HashMap |
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
| Methods inherited from class java.util.AbstractMap |
equals, hashCode, toString |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
equals, hashCode |
| Constructor Detail |
public CmdOptions(java.lang.String[] args)
args - Command line arguments, must not be null| Method Detail |
public static CmdOptions parse(java.lang.String[] args)
args - Comand line arguments, must not be nullpublic boolean printHelp()
public boolean isVerbose()
public java.lang.String getAddress()
public java.lang.String getUser()
public java.lang.String getPass()
public int getPort()
public java.io.File getRoot()
throws java.io.IOException
java.io.IOException - If the root folder does not exist
public java.io.File getLibDir()
throws java.io.IOException
java.io.IOException - If the library folder does not exist
public java.io.File getSystemDir()
throws java.io.IOException
java.io.IOException - If the library folder does not exist
public java.io.File getConfDir()
throws java.io.IOException
java.io.IOException - If the library folder does not exist
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||