Class OptionHandler
- java.lang.Object
- org.springframework.boot.cli.command.options.OptionHandler
- Direct Known Subclasses:
CompilerOptionHandler
public class OptionHandler extends Object
Delegate used byOptionParsingCommandto parse options and run the command.- See Also:
OptionParsingCommand,run(OptionSet)
Constructor Summary
Constructors Constructor Description OptionHandler()
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetHelp()Collection<OptionHelp>getOptionsHelp()joptsimple.OptionParsergetParser()joptsimple.OptionSpecBuilderoption(String name, String description)joptsimple.OptionSpecBuilderoption(List<String> aliases, String description)protected voidoptions()ExitStatusrun(String... args)protected ExitStatusrun(joptsimple.OptionSet options)Run the command using the specified parsedOptionSet.
Constructor Detail
OptionHandler
public OptionHandler()
Method Detail
getParser
public joptsimple.OptionParser getParser()
options
protected void options()
run
public final ExitStatus run(String... args) throws Exception
- Throws:
Exception
run
protected ExitStatus run(joptsimple.OptionSet options) throws Exception
Run the command using the specified parsedOptionSet.- Parameters:
options- the parsed option set- Returns:
- an ExitStatus
- Throws:
Exception- in case of errors
getOptionsHelp
public Collection<OptionHelp> getOptionsHelp()