Class CommandUtils


  • public class CommandUtils
    extends java.lang.Object
    Utils to process a commander.
    • Constructor Summary

      Constructors 
      Constructor Description
      CommandUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void printAvailableCommands​(java.util.Map<java.lang.String,​Command> commands, java.io.PrintStream printer)
      Print the available commands in commander.
      static void printAvailableFlags​(com.beust.jcommander.JCommander commander, java.io.PrintStream printer)
      Print the available flags in commander.
      static void printDescription​(java.io.PrintStream printer, int firstLineIndent, int indent, java.lang.String description)  
      static void printUsage​(java.io.PrintStream printer, java.lang.String usage)  
      • Methods inherited from class java.lang.Object

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

      • CommandUtils

        public CommandUtils()
    • Method Detail

      • printUsage

        public static void printUsage​(java.io.PrintStream printer,
                                      java.lang.String usage)
      • printAvailableFlags

        public static void printAvailableFlags​(com.beust.jcommander.JCommander commander,
                                               java.io.PrintStream printer)
        Print the available flags in commander.
        Parameters:
        commander - commander
        printer - printer
      • printDescription

        public static void printDescription​(java.io.PrintStream printer,
                                            int firstLineIndent,
                                            int indent,
                                            java.lang.String description)
      • printAvailableCommands

        public static void printAvailableCommands​(java.util.Map<java.lang.String,​Command> commands,
                                                  java.io.PrintStream printer)
        Print the available commands in commander.
        Parameters:
        commands - commands
        printer - printer