Interface Synopsisable
- All Known Implementing Classes:
AbstractCondition,AbstractDirective,AbstractOperand,AbstractOption,AbstractProperty,AllCondition,AndCondition,AnyCondition,ArrayDirective,ArrayOperand,ArrayOption,BooleanDirective,BooleanOption,BooleanProperty,CasesCondition,CharDirective,CharOption,CharProperty,CleanFlag,ConfigOption,ConfigProperty,DaemonFlag,DebugFlag,DoubleDirective,DoubleOption,DoubleProperty,EnumDirective,EnumOption,EnumProperty,FileDirective,FileOption,FileProperty,Flag,FloatDirective,FloatOption,FloatProperty,ForceFlag,HelpFlag,InitFlag,IntDirective,IntOption,IntProperty,LongDirective,LongOption,LongProperty,NoneOperand,Operation,OrCondition,QuietFlag,StringDirective,StringOperand,StringOption,StringProperty,SysInfoFlag,VerboseFlag,XorCondition
Synopsisable interface defines those methods required to create a
human readable usage String similar to a manpage's synopsis from the
implementing instance.-
Method Summary
Modifier and TypeMethodDescriptiondefault StringCreates the synopsis for the syntax hierarchy.default StringtoSynopsis(String aArgumentEscapeCode, String aKeywordEscapeCode, String aResetEscapeCode) Creates the synopsis for the syntax hierarchy.toSynopsis(CliContext aCliCtx) Creates the synopsis for the syntax hierarchy.default StringtoSynopsis(SyntaxNotation aSyntaxNotation) Creates the synopsis for the syntax hierarchy.default StringtoSynopsis(SyntaxNotation aSyntaxNotation, String aArgumentEscapeCode, String aKeywordEscapeCode, String aResetEscapeCode) Creates the synopsis for the syntax hierarchy.
-
Method Details
-
toSynopsis
Creates the synopsis for the syntax hierarchy.The difference between a synopsis and a syntax is the most outer parenthesis settings for some notations: The
Term.toSyntax(CliContext)method is called from inside a syntax tree whereas thetoSynopsis(CliContext)method is called from the hierarchy's root, as for some notations require the creation of the most outer braces.Note: This method uses the
SyntaxNotation.LOGICALbe default!- Returns:
- The human readable (verbose) command line arguments synopsis.
-
toSynopsis
default String toSynopsis(String aArgumentEscapeCode, String aKeywordEscapeCode, String aResetEscapeCode) Creates the synopsis for the syntax hierarchy.The difference between a synopsis and a syntax is the most outer parenthesis settings for some notations: The
Term.toSyntax(CliContext)method is called from inside a syntax tree whereas thetoSynopsis(CliContext)method is called from the hierarchy's root, as for some notations require the creation of the most outer braces.Note: This method uses the
SyntaxNotation.LOGICALbe default!- Parameters:
aArgumentEscapeCode- The escape code to use when rendering (option's) argumentsaKeywordEscapeCode- The escape code to be used when rendering keywords (options.)aResetEscapeCode- The escape code resetting any previously applied escape codes.- Returns:
- The human readable (verbose) command line arguments synopsis.
-
toSynopsis
Creates the synopsis for the syntax hierarchy.The difference between a synopsis and a syntax is the most outer parenthesis settings for some notations: The
Term.toSyntax(CliContext)method is called from inside a syntax tree whereas thetoSynopsis(CliContext)method is called from the hierarchy's root, as for some notations require the creation of the most outer braces.Note: This method uses the default escape codes for syntax highlighting!
- Parameters:
aSyntaxNotation- The syntax notation used for generating the command line arguments syntax.- Returns:
- The human readable (verbose) command line arguments synopsis.
-
toSynopsis
default String toSynopsis(SyntaxNotation aSyntaxNotation, String aArgumentEscapeCode, String aKeywordEscapeCode, String aResetEscapeCode) Creates the synopsis for the syntax hierarchy.The difference between a synopsis and a syntax is the most outer parenthesis settings for some notations: The
Term.toSyntax(CliContext)method is called from inside a syntax tree whereas thetoSynopsis(CliContext)method is called from the hierarchy's root, as for some notations require the creation of the most outer braces.- Parameters:
aSyntaxNotation- The syntax notation used for generating the command line arguments syntax.aArgumentEscapeCode- The escape code to use when rendering (option's) argumentsaKeywordEscapeCode- The escape code to be used when rendering keywords (options.)aResetEscapeCode- The escape code resetting any previously applied escape codes.- Returns:
- The human readable (verbose) command line arguments synopsis.
-
toSynopsis
Creates the synopsis for the syntax hierarchy.The difference between a synopsis and a syntax is the most outer parenthesis settings for some notations: The
Term.toSyntax(CliContext)method is called from inside a syntax tree whereas thetoSynopsis(CliContext)method is called from the hierarchy's root, as for some notations require the creation of the most outer braces.- Parameters:
aCliCtx- TheCliContextfor which the syntax is being generated.- Returns:
- The human readable (verbose) command line arguments synopsis.
-