|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public static interface CmdLineOption.Parameters
SPI for CmdLineOption.
Object of this interface is passed to
CmdLineOptions to make it easy/safe to parse
additional parameters for options.
| Method Summary | |
|---|---|
int |
getIntParameter(int idx)
The convenience method of Integer.parseInt(getParameter(idx))
with proper error handling. |
java.lang.String |
getOptionName()
Gets the recognized option name. |
java.lang.String |
getParameter(int idx)
Gets the additional parameter to this option. |
| Method Detail |
|---|
java.lang.String getOptionName()
CmdLineOption.accepts(String) method and
the method has returned true.
java.lang.String getParameter(int idx)
throws CmdLineException
idx - specifying 0 will retrieve the token next to the option.
For example, if the command line looks like "-o abc -d x",
then getParameter(0) for "-o" returns "abc"
and getParameter(1) will return "-d".
CmdLineException.
CmdLineException
int getIntParameter(int idx)
throws CmdLineException
Integer.parseInt(getParameter(idx))
with proper error handling.
CmdLineException - If the parameter is not an integer, it throws an
approrpiate CmdLineException.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||