Class Cli<CliFlagsT extends CliFlags>


  • public class Cli<CliFlagsT extends CliFlags>
    extends java.lang.Object
    Cli to execute CliSpec.
    • Method Detail

      • getCmdPath

        static <CliFlagsT extends CliFlags> java.lang.String getCmdPath​(CliSpec<CliFlagsT> spec)
      • setupConsole

        static <CliFlagsT extends CliFlags> java.io.PrintStream setupConsole​(CliSpec<CliFlagsT> spec)
      • name

        java.lang.String name()
      • cmdPath

        java.lang.String cmdPath()
      • hasCommand

        boolean hasCommand​(java.lang.String command)
      • getCommand

        Command getCommand​(java.lang.String command)
      • setupCli

        static <CliFlagsT extends CliFlags> com.beust.jcommander.JCommander setupCli​(java.lang.String cmdPath,
                                                                                     CliSpec<CliFlagsT> spec,
                                                                                     java.util.Map<java.lang.String,​Command> commandMap)
      • console

        protected void console​(java.lang.String msg)
      • console

        protected java.io.PrintStream console()
      • usage

        void usage()
      • usage

        void usage​(java.lang.String errorMsg)
      • run

        boolean run​(java.lang.String[] args)
      • runCli

        public static <CliOptsT extends CliFlags> int runCli​(CliSpec<CliOptsT> spec,
                                                             java.lang.String[] args)
      • printUsage

        public static <CliOptsT extends CliFlags> void printUsage​(CliSpec<CliOptsT> spec)
      • getCommandMap

        java.util.Map<java.lang.String,​Command> getCommandMap()