01: package org.kohsuke.args4j.spi;
02:
03: import org.kohsuke.args4j.CmdLineException;
04:
05: /**
06: * List of arguments.
07: *
08: * <p>
09: * Object of this interface is passed to
10: * {@link OptionHandler}s to make it easy/safe to parse
11: * additional parameters for options.
12: */
13: public interface Parameters {
14: /**
15: * Gets the additional parameter to this option.
16: *
17: * @param idx
18: * specifying 0 will retrieve the token next to the option.
19: * For example, if the command line looks like "-o abc -d x",
20: * then <code>getParameter(0)</code> for "-o" returns "abc"
21: * and <code>getParameter(1)</code> will return "-d".
22: *
23: * @return
24: * Always return non-null valid String. If an attempt is
25: * made to access a non-existent index, this method throws
26: * appropriate {@link org.kohsuke.args4j.CmdLineException}.
27: */
28: public String getParameter(int idx) throws CmdLineException;
29: }
|