|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--submarine.util.CommandLine
Static class giving some tool functions for command line arguments
>java classe -option value
getArgument(args, "option") returns "value"
getArgumentEx(args, "option", aStringHolder) return true and aStringHolder.value=="value"
>java classe -option
getArgument(args, "option") returns ""
getArgumentEx(args, "option", aStringHolder) return true and aStringHolder.value==""
Constructor Summary | |
CommandLine()
|
Method Summary | |
static java.lang.String |
getArgument(java.lang.String[] args,
java.lang.String option)
Find the -option argument in args[] and returns the folowing argument if any |
static boolean |
getArgumentEx(java.lang.String[] args,
java.lang.String option,
org.omg.CORBA.StringHolder result)
Find the -option argument in args[] and fill result with the following argument if any |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public CommandLine()
Method Detail |
public static java.lang.String getArgument(java.lang.String[] args, java.lang.String option)
args
- The arguments of the command line in the original orderoption
- The string to find after a minus (-) character in the argumentsgetArgumentEx(java.lang.String[], java.lang.String, org.omg.CORBA.StringHolder)
public static boolean getArgumentEx(java.lang.String[] args, java.lang.String option, org.omg.CORBA.StringHolder result)
args
- The arguments of the command line in the original orderoption
- The string to find after a minus (-) character in the argumentsresult
- A org.omg.CORBA.StringHolder to receive the option valueFalse if the -option value was not found.
|
Submarine project. free distribution of this software must include the opensource licence. Guénolé de Cadoudal. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |