Class SynopsisHelpGenerator
- java.lang.Object
-
- io.bootique.help.DefaultHelpGenerator
-
- org.arakhne.afc.bootique.synopsishelp.help.SynopsisHelpGenerator
-
- All Implemented Interfaces:
io.bootique.help.HelpGenerator
public class SynopsisHelpGenerator extends io.bootique.help.DefaultHelpGenerator
A generator of command-line help that displays the synopsis in addition to the other sections provided byDefaultHelpGenerator
.- Since:
- 15.0
- Version:
- 17.0 2020-01-04 14:41:57
- Author:
- Stéphane GALLAND
- Maven Group Id:
- org.arakhne.afc.bootique
- Maven Artifact Id:
- bootique-synopsishelp
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
SynopsisHelpGenerator.SynopsisHelpAppender
Appender for the synopsis help.
-
Constructor Summary
Constructors Constructor Description SynopsisHelpGenerator(io.bootique.meta.application.ApplicationMetadata metadata, String argumentSynopsis, String detailedDescription, int lineWidth)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
append(Appendable out)
protected SynopsisHelpGenerator.SynopsisHelpAppender
createAppender(Appendable out)
protected io.bootique.meta.application.ApplicationMetadata
getApplicationMetadata()
Replies the description of the application.protected void
printDetailedDescription(SynopsisHelpGenerator.SynopsisHelpAppender out, String detailedDescription)
Print the detailed description of the command.protected void
printSynopsis(io.bootique.help.HelpAppender out, String name, String argumentSynopsis)
Print the synopsis of the command.-
Methods inherited from class io.bootique.help.DefaultHelpGenerator
collectOptions, createConsoleAppender, printEnvironment, printName, printOptions
-
-
-
-
Constructor Detail
-
SynopsisHelpGenerator
public SynopsisHelpGenerator(io.bootique.meta.application.ApplicationMetadata metadata, String argumentSynopsis, String detailedDescription, int lineWidth)
Constructor.- Parameters:
metadata
- the metadata of the application.argumentSynopsis
- the synopsis of the arguments. Ifnull
, the default description is used. If it is an empty string, no argument description is displayed.detailedDescription
- the detailed description of the application.lineWidth
- the width of a console line.
-
-
Method Detail
-
createAppender
protected SynopsisHelpGenerator.SynopsisHelpAppender createAppender(Appendable out)
- Overrides:
createAppender
in classio.bootique.help.DefaultHelpGenerator
-
getApplicationMetadata
protected io.bootique.meta.application.ApplicationMetadata getApplicationMetadata()
Replies the description of the application.- Returns:
- the metadata.
-
append
public void append(Appendable out)
- Specified by:
append
in interfaceio.bootique.help.HelpGenerator
- Overrides:
append
in classio.bootique.help.DefaultHelpGenerator
-
printSynopsis
protected void printSynopsis(io.bootique.help.HelpAppender out, String name, String argumentSynopsis)
Print the synopsis of the command.- Parameters:
out
- the output receiver.name
- the name of the command.argumentSynopsis
- the synopsis of the arguments.
-
printDetailedDescription
protected void printDetailedDescription(SynopsisHelpGenerator.SynopsisHelpAppender out, String detailedDescription)
Print the detailed description of the command.- Parameters:
out
- the output receiver.detailedDescription
- the detailed description of the application.
-
-