Class CliTool



  • public class CliTool
    extends Object
    • Constructor Summary

      Constructors

      Constructor and Description
      CliTool(String helpMessage, Options options)
       
    • Constructor Detail

    • Method Detail

      • printHelpAndExit

        public void printHelpAndExit()
        Prints the help message and terminates the JVM with the specified exit code. Same as calling printHelpAndExit(int) with an exit code of 1.
      • printHelpAndExit

        public void printHelpAndExit(int exitCode)
        Prints the help message and terminates the JVM with the specified exit code.
        Parameters:
        exitCode - the exit code to use for System.exit(int)
      • printMessageAndHelpAndExit

        public void printMessageAndHelpAndExit(String message)
        Prints the specified message, followed by the help message and terminates the JVM with an exit code of 1. Same as calling printMessageAndHelpAndExit(int, String) with an exit code of 1.
        Parameters:
        message - the line to print in front of the help message
      • printMessageAndHelpAndExit

        public void printMessageAndHelpAndExit(int exitCode,
                                               String message)
        Prints the specified message, followed by the help message and terminates the JVM with the specified exit code.
        Parameters:
        exitCode - the exit code to use for System.exit(int)
        message - the line to print in front of the help message
      • printMessagesAndHelpAndExit

        public void printMessagesAndHelpAndExit(String... messages)
        Prints the specified messages, followed by the help message and terminates the JVM with an exit code of 1. Same as calling printMessagesAndHelpAndExit(int, String...) with an exit code of 1.
        Parameters:
        messages - the lines to print in front of the help message
      • printMessagesAndHelpAndExit

        public void printMessagesAndHelpAndExit(int exitCode,
                                                String... messages)
        Prints the specified messages, followed by the help message and terminates the JVM with the specified exit code.
        Parameters:
        exitCode - the exit code to use for System.exit(int)
        messages - the lines to print in front of the help message