Class OptionHandler
java.lang.Object
org.springframework.boot.cli.command.options.OptionHandler
- Direct Known Subclasses:
CompilerOptionHandler
Delegate used by
OptionParsingCommand to parse options and run the command.- Since:
- 1.0.0
- Author:
- Dave Syer
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a newOptionHandlerinstance.OptionHandler(Function<String, String> argumentProcessor) Create a newOptionHandlerinstance with an argument processor. -
Method Summary
Modifier and TypeMethodDescriptiongetHelp()joptsimple.OptionParserjoptsimple.OptionSpecBuilderjoptsimple.OptionSpecBuilderprotected voidoptions()final ExitStatusprotected ExitStatusrun(joptsimple.OptionSet options) Run the command using the specified parsedOptionSet.
-
Constructor Details
-
OptionHandler
public OptionHandler()Create a newOptionHandlerinstance. -
OptionHandler
Create a newOptionHandlerinstance 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
-