Class CommandDefinition

    • Constructor Detail

      • CommandDefinition

        protected CommandDefinition​(String[] name)
    • Method Detail

      • getName

        public String[] getName()
        The fully qualified name of this command.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getPipeline

        public List<CommandStep> getPipeline()
        Returns the steps in the command's pipeline
      • getArgument

        public CommandArgumentDefinition<?> getArgument​(String argName)
        Returns the given argument definition for this command. Handles argument name smoothing. Returns null if no argument matches.
      • getArguments

        public <T> SortedSet<CommandArgumentDefinition<T>> getArguments​(Class<T> argumentType)
        Convenience method to return the arguments for this command which are of a given type.
      • getShortDescription

        public String getShortDescription()
        The short description of the command. Used in help docs.
      • setShortDescription

        public void setShortDescription​(String shortDescription)
      • getGroupShortDescription

        public String getGroupShortDescription​(String[] group)
        The short description of the given command group. Used in help docs.
      • setGroupShortDescription

        public void setGroupShortDescription​(String[] group,
                                             String shortDescription)
        Sets the short description of the given command group for help docs. If multiple command commands set different descriptions for the group, which version will be shown in any rolled up help is undefined.
      • getGroupLongDescription

        public String getGroupLongDescription​(String[] group)
        The long description of the given command group. Used in help docs. If multiple command commands set different descriptions for the group, which version will be shown in any rolled up help is undefined.
      • setGroupLongDescription

        public void setGroupLongDescription​(String[] group,
                                            String longDescription)
      • getLongDescription

        public String getLongDescription()
        The long description of the command. Used in help docs.
      • setLongDescription

        public void setLongDescription​(String longDescription)
      • getHelpFooter

        public String getHelpFooter()
      • setHelpFooter

        public void setHelpFooter​(String footer)
      • getGroupHelpFooter

        public String getGroupHelpFooter()
      • setGroupHelpFooter

        public void setGroupHelpFooter​(String groupFooter)
      • getInternal

        public boolean getInternal()
        Internal commands are ones that can be called programmatically, but should not be exposed directly and automatically through integrations.
      • setInternal

        public void setInternal​(boolean internal)
      • getHidden

        public boolean getHidden()
        Hidden commands are ones that can be called via integrations, but should not be normally shown in help to users. "Alias" or legacy commands are often marked as hidden commands.
      • setHidden

        public void setHidden​(boolean hidden)
      • is

        public boolean is​(String... commandName)
        Return true if this command represents the given command
      • addAlias

        public void addAlias​(String[] alias)
        Add an alias to the command.