org.clapper.util.cmdline
Interface ParameterHandler
-
public interface ParameterHandlerThie interface defines the callback methods used by aParameterParserobject, when itsparse()method is called.- See Also:
ParameterParser,CommandLineUtility
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description voidparseOption(char shortOption, java.lang.String longOption, java.util.Iterator<java.lang.String> it)Handles a parsed option.voidparsePostOptionParameters(java.util.Iterator<java.lang.String> it)Handles all parameters that appear after the end of the options.
-
-
-
Method Detail
-
parseOption
void parseOption(char shortOption, java.lang.String longOption, java.util.Iterator<java.lang.String> it) throws CommandLineUsageException, java.util.NoSuchElementExceptionHandles a parsed option.- Parameters:
shortOption- the (character) short option, if any; otherwise, the constantUsageInfo.NO_SHORT_OPTION.longOption- the (string) long option, if any; otherwise, null.it- An Iterator from which to retrieve any value(s) for the option- Throws:
CommandLineUsageException- 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
-
parsePostOptionParameters
void parsePostOptionParameters(java.util.Iterator<java.lang.String> it) throws CommandLineUsageException, java.util.NoSuchElementExceptionHandles all parameters that appear after the end of the options. If there are no such parameters, the implementation of this method should just return without doing anything.- Parameters:
it- the Iterator containing the parameters- Throws:
CommandLineUsageException- 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
-
-
DMelt 3.0 © DataMelt by jWork.ORG