public static interface CmdLineOption.Parameters
CmdLineOption.
Object of this interface is passed to
CmdLineOptions to make it easy/safe to parse
additional parameters for options.| Modifier and Type | Method and Description |
|---|---|
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.
|
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.CmdLineExceptionint 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.Copyright © 2003-2013 Kohsuke Kawaguchi. All Rights Reserved.