Class CliBuilder<C>

  • Type Parameters:
    C - Command type

    public class CliBuilder<C>
    extends AbstractBuilder<Cli<C>>
    Builder for CLIs
    • Field Detail

      • name

        protected final java.lang.String name
      • description

        protected java.lang.String description
      • optionSeparators

        protected java.lang.String optionSeparators
      • defaultCommand

        protected java.lang.Class<? extends C> defaultCommand
      • defaultCommandGroupCommands

        protected final java.util.List<java.lang.Class<? extends C>> defaultCommandGroupCommands
      • groups

        protected final java.util.Map<java.lang.String,​GroupBuilder<C>> groups
      • baseHelpSections

        protected final java.util.Map<java.lang.String,​HelpSection> baseHelpSections
    • Constructor Detail

      • CliBuilder

        public CliBuilder​(java.lang.String name)
    • Method Detail

      • withDescription

        public CliBuilder<C> withDescription​(java.lang.String description)
      • withDefaultCommand

        public CliBuilder<C> withDefaultCommand​(java.lang.Class<? extends C> defaultCommand)
      • withCommand

        public CliBuilder<C> withCommand​(java.lang.Class<? extends C> command)
      • withCommands

        public CliBuilder<C> withCommands​(java.lang.Class<? extends C> command,
                                          java.lang.Class<? extends C>... moreCommands)
      • withCommands

        public CliBuilder<C> withCommands​(java.lang.Iterable<java.lang.Class<? extends C>> commands)
      • withGroup

        public GroupBuilder<C> withGroup​(java.lang.String name)
      • getGroup

        public GroupBuilder<C> getGroup​(java.lang.String name)
      • withNoRestrictions

        public CliBuilder<C> withNoRestrictions()
      • withDefaultRestrictions

        public CliBuilder<C> withDefaultRestrictions()
      • withOnlyDefaultRestrictions

        public CliBuilder<C> withOnlyDefaultRestrictions()