Class GlobalMetadata<T>


  • public class GlobalMetadata<T>
    extends java.lang.Object
    Represents metadata about a CLI
    • Field Detail

      • name

        private final java.lang.String name
      • description

        private final java.lang.String description
      • defaultGroupCommands

        private final java.util.List<CommandMetadata> defaultGroupCommands
      • baseHelpSections

        private final java.util.List<HelpSection> baseHelpSections
    • Method Detail

      • checkForSuppressedCommands

        private static void checkForSuppressedCommands​(CommandGroupMetadata group,
                                                       java.lang.String groupPath)
      • checkForSuppressedCommands

        private static void checkForSuppressedCommands​(java.util.List<CommandMetadata> commands,
                                                       CommandMetadata defaultCommand,
                                                       java.lang.String groupName)
      • suppressedCommand

        private static void suppressedCommand​(java.lang.Class<?> cls,
                                              CommandMetadata cmd,
                                              java.lang.String groupName)
      • getName

        public java.lang.String getName()
        Gets the name of the CLI
        Returns:
        Name
      • getDescription

        public java.lang.String getDescription()
        Gets the description of the CLI
        Returns:
        Description
      • getOptions

        public java.util.List<OptionMetadata> getOptions()
        Gets the global scoped options
        Returns:
        Options
      • getDefaultCommand

        public CommandMetadata getDefaultCommand()
        Gets the default command for the CLI
        Returns:
        Default command
      • getDefaultGroupCommands

        public java.util.List<CommandMetadata> getDefaultGroupCommands()
        Gets the default group of commands for the CLI i.e. commands that don't need a group to be specified
        Returns:
        Default group commands
      • getCommandGroups

        public java.util.List<CommandGroupMetadata> getCommandGroups()
        Gets the command groups for the CLI
        Returns:
        Command groups
      • getRestrictions

        public java.util.List<GlobalRestriction> getRestrictions()
        Gets the global restrictions
        Returns:
        Global restrictions
      • getBaseHelpSections

        public java.util.List<HelpSection> getBaseHelpSections()
        Gets the base help sections used by all commands unless specifically overridden by individual commands
        Returns:
        Base help sections
      • getParserConfiguration

        public ParserMetadata<T> getParserConfiguration()
        Gets the parser configuration for the CLI
        Returns:
        Parser configuration
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object