Interface Synopsisable

All Known Subinterfaces:
Condition, Directive<T>, Operand<T>, Option<T>, Property<T>, Term
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

public interface Synopsisable
The Synopsisable interface defines those methods required to create a human readable usage String similar to a manpage's synopsis from the implementing instance.
  • Method Details

    • toSynopsis

      default String 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 the toSynopsis(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.LOGICAL be 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 the toSynopsis(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.LOGICAL be default!

      Parameters:
      aArgumentEscapeCode - The escape code to use when rendering (option's) arguments
      aKeywordEscapeCode - 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

      default String toSynopsis(SyntaxNotation aSyntaxNotation)
      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 the toSynopsis(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 the toSynopsis(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) arguments
      aKeywordEscapeCode - 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

      String toSynopsis(CliContext aCliCtx)
      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 the toSynopsis(CliContext) method is called from the hierarchy's root, as for some notations require the creation of the most outer braces.

      Parameters:
      aCliCtx - The CliContext for which the syntax is being generated.
      Returns:
      The human readable (verbose) command line arguments synopsis.