Interface Command<GlobalFlagsT extends CliFlags>

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      java.lang.Boolean apply​(GlobalFlagsT globalFlagsT, java.lang.String[] args)
      Process the command.
      default java.lang.String category()
      Return category of this command belongs to.
      java.lang.String description()
      Return description name.
      default boolean hidden()
      Returns whether to hide this command from showing in help message.
      java.lang.String name()
      Return command name.
      default java.lang.String path()
      Return command path in a cli path.
      void usage()
      Print the help information.
    • Method Detail

      • hidden

        default boolean hidden()
        Returns whether to hide this command from showing in help message.
        Returns:
        true if hide this command from help message.
      • category

        default java.lang.String category()
        Return category of this command belongs to.
        Returns:
        category name
      • name

        java.lang.String name()
        Return command name.
        Returns:
        command name.
      • path

        default java.lang.String path()
        Return command path in a cli path.

        This is used for printing usage information.

        Returns:
        command path
      • description

        java.lang.String description()
        Return description name.
        Returns:
        description name.
      • apply

        java.lang.Boolean apply​(GlobalFlagsT globalFlagsT,
                                java.lang.String[] args)
                         throws java.lang.Exception
        Process the command.
        Parameters:
        args - command args
        Returns:
        true if successfully apply the args, otherwise false
        Throws:
        java.lang.Exception
      • usage

        void usage()
        Print the help information.