Class OptionHandler
java.lang.Object
org.springframework.boot.cli.command.options.OptionHandler
Delegate used by
OptionParsingCommand
to parse options and run the command.- Since:
- 1.0.0
- Author:
- Dave Syer
- See Also:
-
Constructor Summary
ConstructorDescriptionCreate a newOptionHandler
instance.OptionHandler
(Function<String, String> argumentProcessor) Create a newOptionHandler
instance with an argument processor. -
Method Summary
Modifier and TypeMethodDescriptiongetHelp()
joptsimple.OptionParser
joptsimple.OptionSpecBuilder
joptsimple.OptionSpecBuilder
protected void
options()
final ExitStatus
protected ExitStatus
run
(joptsimple.OptionSet options) Run the command using the specified parsedOptionSet
.
-
Constructor Details
-
OptionHandler
public OptionHandler()Create a newOptionHandler
instance. -
OptionHandler
Create a newOptionHandler
instance with an argument processor.- Parameters:
argumentProcessor
- strategy that can be used to manipulate arguments before they are used.
-
-
Method Details
-
option
-
option
-
getParser
public joptsimple.OptionParser getParser() -
options
protected void options() -
run
- Throws:
Exception
-
run
Run the command using the specified parsedOptionSet
.- Parameters:
options
- the parsed option set- Returns:
- an ExitStatus
- Throws:
Exception
- in case of errors
-
getHelp
-
getOptionsHelp
-