|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openmdx.base.application.control.CmdLineArgs
public class CmdLineArgs
CmdLineArgs holds the parsed command line arguments.
| Constructor Summary | |
|---|---|
CmdLineArgs()
|
|
| Method Summary | |
|---|---|
Properties |
getAsProperties()
Returns all command line attribute as Properties |
String |
getFirstValue(String id)
Returns the first command line attribute value of a possible multi-value option id. |
List |
getFreeArgs()
Get the non option (free) arguments |
List |
getRawArgs()
Returns the argument list as passed in by Java main() |
List |
getValues(String id)
Returns all command line attribute values for a given option id. |
boolean |
hasArg(String id)
Checks wether the argument given by 'id' has been passed in the command line The option id has no leading option marker "-", "--" E.g. |
boolean |
readArgumentFile(String fileName)
Reads additional arguments from an external argument file, and mergers it with current raw args |
void |
setParsedArgs(ArrayList parsedArgs,
ArrayList parsedFreeArgs)
Set the parsed command line arguments |
void |
setRawArgs(String[] args)
Set the raw command line arguments |
String |
toString()
Returns a string representation of the parsed arguments |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CmdLineArgs()
| Method Detail |
|---|
public boolean hasArg(String id)
public String getFirstValue(String id)
public List getValues(String id)
public Properties getAsProperties()
Switches: property-name=name; property-value=(null)
Single value arguments: property-name=name; property-value=value
Multiple value arguments: property-name=name[ii]; property-value=value
Free arguments: property-name=free-arg[ii]; property-value=value
public List getFreeArgs()
public List getRawArgs()
public String toString()
toString in class Objectpublic void setRawArgs(String[] args)
args - The arguments from main()
public void setParsedArgs(ArrayList parsedArgs,
ArrayList parsedFreeArgs)
parsedArgs - The parsed arguments a list of objects of class CmdLineArgparsedFreeArgs - The parsed free arguments a list of objects of class Stringpublic boolean readArgumentFile(String fileName)
fileName - an argument file
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||