Package io.sbk.params.impl
Class SbkInputOptions
java.lang.Object
io.sbk.params.impl.SbkInputOptions
- All Implemented Interfaces:
InputOptions,ParsedOptions,ParseInputOptions
- Direct Known Subclasses:
SbkParameters,SbkYalParameters
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidAdd the driver specific command line arguments.final StringGet the -help output.getOptionValue(String name) Retrieve the Option matching the parameter name specified.getOptionValue(String name, String defaultValue) Retrieve the Option matching the parameter name specified.final booleanReturns whether the named Option exists.booleanhasOptionValue(String name) Returns whether the named Option has the value after parsing.voidParse the command line arguments.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.sbk.params.ParsedOptions
printHelp
-
Constructor Details
-
SbkInputOptions
-
-
Method Details
-
addOption
public final void addOption(String name, boolean hasArg, String description) throws IllegalArgumentException Description copied from interface:InputOptionsAdd the driver specific command line arguments.- Specified by:
addOptionin interfaceInputOptions- Parameters:
name- Name of the parameter to add.hasArg- flag signalling if an argument is required after this option.description- Self-documenting description.- Throws:
IllegalArgumentException- if 'name' already added.
-
hasOption
Description copied from interface:InputOptionsReturns whether the named Option exists.- Specified by:
hasOptionin interfaceInputOptions- Parameters:
name- name of the parameter option- Returns:
- true if the named Option is a member of this Options
-
getHelpText
Description copied from interface:ParsedOptionsGet the -help output.- Specified by:
getHelpTextin interfaceParsedOptions- Returns:
- formatted Help text
-
hasOptionValue
Description copied from interface:ParsedOptionsReturns whether the named Option has the value after parsing.- Specified by:
hasOptionValuein interfaceParsedOptions- Parameters:
name- name of the parameter option- Returns:
- true if the named Option is a member of this Options
-
getOptionValue
Description copied from interface:ParsedOptionsRetrieve the Option matching the parameter name specified.- Specified by:
getOptionValuein interfaceParsedOptions- Parameters:
name- Name of the parameter.- Returns:
- parameter value
-
getOptionValue
Description copied from interface:ParsedOptionsRetrieve the Option matching the parameter name specified.- Specified by:
getOptionValuein interfaceParsedOptions- Parameters:
name- Name of the parameter.defaultValue- default value if the parameter not found- Returns:
- parameter value
-
parseArgs
public void parseArgs(String[] args) throws org.apache.commons.cli.ParseException, IllegalArgumentException, HelpException Description copied from interface:ParseInputOptionsParse the command line arguments.- Specified by:
parseArgsin interfaceParseInputOptions- Parameters:
args- list of command line arguments.- Throws:
org.apache.commons.cli.ParseException- If an exception occurred.IllegalArgumentException- If an exception occurred.HelpException- If the 'help' option is supplied.
-