public interface ParameterHandler
ParameterParser
object, when its
parse()
method is called.ParameterParser
,
CommandLineUtility
Modifier and Type | Method and Description |
---|---|
void |
parseOption(char shortOption,
java.lang.String longOption,
java.util.Iterator<java.lang.String> it)
Handles a parsed option.
|
void |
parsePostOptionParameters(java.util.Iterator<java.lang.String> it)
Handles all parameters that appear after the end of the options.
|
void parseOption(char shortOption, java.lang.String longOption, java.util.Iterator<java.lang.String> it) throws CommandLineUsageException, java.util.NoSuchElementException
shortOption
- the (character) short option, if any; otherwise,
the constant UsageInfo.NO_SHORT_OPTION
.longOption
- the (string) long option, if any; otherwise,
null.it
- An Iterator from which to retrieve any
value(s) for the optionCommandLineUsageException
- on errorjava.util.NoSuchElementException
- attempt to iterate past end of args;
ParameterParser.parse(java.lang.String[], org.clapper.util.cmdline.ParameterHandler)
automatically handles this exception,
so it's safe for implementations of
this method not to handle itvoid parsePostOptionParameters(java.util.Iterator<java.lang.String> it) throws CommandLineUsageException, java.util.NoSuchElementException
it
- the Iterator containing the parametersCommandLineUsageException
- on errorjava.util.NoSuchElementException
- attempt to iterate past end of args;
ParameterParser.parse(java.lang.String[], org.clapper.util.cmdline.ParameterHandler)
automatically handles this exception,
so it's safe for implementations of
this method not to handle it