Class CliTool

    • Constructor Summary

      Constructors 
      Constructor Description
      CliTool()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected static <T> T checkNotNull​(T arg)  
      private static void helpDisplayCommandOptions​(java.io.PrintStream pw, com.beust.jcommander.JCommander jc)  
      private static void helpDisplayCommandOptions​(java.io.PrintStream pw, java.lang.String command, com.beust.jcommander.JCommander jc)  
      protected static void main​(java.lang.String[] args, CliTool command)
      Parse and execute a single command.
      protected static void main​(java.lang.String[] args, CliTool... commands)
      Parse and execute one of the commands.
      protected static void printf​(java.lang.String msg, java.lang.Object... args)  
      void setCallSystemExit​(boolean flag)
      Call System.exit(int) at the end of command processing.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.concurrent.Callable

        call
    • Field Detail

      • callSystemExit

        private boolean callSystemExit
      • help

        private boolean help
    • Constructor Detail

      • CliTool

        public CliTool()
    • Method Detail

      • setCallSystemExit

        public void setCallSystemExit​(boolean flag)
        Call System.exit(int) at the end of command processing.
        Parameters:
        flag - Call System.exit(int) if true.
      • main

        protected static void main​(java.lang.String[] args,
                                   CliTool... commands)
        Parse and execute one of the commands.
        Parameters:
        args - Command line arguments (command and options).
        commands - A list of commands.
      • main

        protected static void main​(java.lang.String[] args,
                                   CliTool command)
        Parse and execute a single command.
        Parameters:
        args - Command line arguments (command and options).
        command - The command to execute.
      • printf

        protected static void printf​(java.lang.String msg,
                                     java.lang.Object... args)
      • checkNotNull

        protected static <T> T checkNotNull​(T arg)
      • helpDisplayCommandOptions

        private static void helpDisplayCommandOptions​(java.io.PrintStream pw,
                                                      java.lang.String command,
                                                      com.beust.jcommander.JCommander jc)
      • helpDisplayCommandOptions

        private static void helpDisplayCommandOptions​(java.io.PrintStream pw,
                                                      com.beust.jcommander.JCommander jc)