|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A utility class that makes it easier to parse the command line.
Method Summary | |
void |
addName(java.lang.String iName)
Add a command-line name to the command-line names array. |
void |
addOption(java.lang.String iName,
java.lang.String iValue)
Add a command-line option to the command-line option array. |
java.lang.String |
getAppDir()
Returns the directory in which the application executable resides; or the directory in which the Cocoa application wrapper resides on MacOS/X. |
java.lang.String |
getAppPath()
Returns the full path to the application executable. |
boolean |
getBoolOption(java.lang.String iName)
Check for a -[no]option toggle. |
boolean |
getBoolOption(java.lang.String iName,
boolean defaultValue)
Check for a -[no]option toggle. |
java.lang.String |
getName()
Query filename specified on commandline (that is, without leading '-');. |
java.lang.String |
getName(int iIndex)
Query filename specified on commandline (that is, without leading '-');. |
java.lang.String |
getOption(java.lang.String iName)
Query specific commandline option (you can query second etc. such option);. |
java.lang.String |
getOption(java.lang.String iName,
int iIndex)
Query specific commandline option (you can query second etc. such option);. |
java.lang.String |
getResourceDir()
Returns the directory in which the application's resources resides. |
void |
initialize(java.lang.String[] argv)
Initialize for the given command line. |
boolean |
replaceName(java.lang.String iValue)
Replace the Nth command-line name with a new value. |
boolean |
replaceName(java.lang.String iValue,
int iIndex)
Replace the Nth command-line name with a new value. |
boolean |
replaceOption(java.lang.String iName,
java.lang.String iValue)
Replace the Nth command-line option with a new value. |
boolean |
replaceOption(java.lang.String iName,
java.lang.String iValue,
int iIndex)
Replace the Nth command-line option with a new value. |
void |
reset()
Clear all options and names. |
Methods inherited from interface crystalspace.jbind.interfaces.iutil.scf.iBase |
decRef, getRefCount, getVersion, incRef, queryInterface, queryInterfaceSafe |
Methods inherited from interface crystalspace.jbind.interfaces.iPointer |
changePointer, getPointer, isMemoryOwner, setMemoryOwner |
Method Detail |
public void addName(java.lang.String iName)
iName
- public void addOption(java.lang.String iName, java.lang.String iValue)
iName
- iValue
- public java.lang.String getAppDir()
public java.lang.String getAppPath()
public boolean getBoolOption(java.lang.String iName)
iName
-
public boolean getBoolOption(java.lang.String iName, boolean defaultValue)
iName
- defaultValue
-
public java.lang.String getName()
getName
in interface iBase
public java.lang.String getName(int iIndex)
iIndex
-
public java.lang.String getOption(java.lang.String iName)
iName
-
public java.lang.String getOption(java.lang.String iName, int iIndex)
iName
- iIndex
-
public java.lang.String getResourceDir()
public void initialize(java.lang.String[] argv)
argv
- public boolean replaceName(java.lang.String iValue)
iValue
-
public boolean replaceName(java.lang.String iValue, int iIndex)
iValue
- iIndex
-
public boolean replaceOption(java.lang.String iName, java.lang.String iValue)
iName
- iValue
-
public boolean replaceOption(java.lang.String iName, java.lang.String iValue, int iIndex)
iName
- iValue
- iIndex
-
public void reset()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |