Class HelpCommand<GlobalFlagsT extends CliFlags,​CommandFlagsT extends CliFlags>

  • All Implemented Interfaces:
    Command<GlobalFlagsT>

    class HelpCommand<GlobalFlagsT extends CliFlags,​CommandFlagsT extends CliFlags>
    extends java.lang.Object
    implements Command<GlobalFlagsT>
    Help command to show help information.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Boolean apply​(GlobalFlagsT globalFlags, java.lang.String[] args)
      Process the command.
      java.lang.String description()
      Return description name.
      java.lang.String name()
      Return command name.
      void usage()
      Print the help information.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • name

        public java.lang.String name()
        Description copied from interface: Command
        Return command name.
        Specified by:
        name in interface Command<GlobalFlagsT extends CliFlags>
        Returns:
        command name.
      • description

        public java.lang.String description()
        Description copied from interface: Command
        Return description name.
        Specified by:
        description in interface Command<GlobalFlagsT extends CliFlags>
        Returns:
        description name.
      • apply

        public java.lang.Boolean apply​(GlobalFlagsT globalFlags,
                                       java.lang.String[] args)
                                throws java.lang.Exception
        Description copied from interface: Command
        Process the command.
        Specified by:
        apply in interface Command<GlobalFlagsT extends CliFlags>
        args - command args
        Returns:
        true if successfully apply the args, otherwise false
        Throws:
        java.lang.Exception