Class CommandHelper

java.lang.Object
org.incenp.obofoundry.kgcl.cli.CommandHelper
All Implemented Interfaces:
picocli.CommandLine.IExecutionExceptionHandler, picocli.CommandLine.IVersionProvider

public class CommandHelper extends Object implements picocli.CommandLine.IVersionProvider, picocli.CommandLine.IExecutionExceptionHandler
A helper class for command line tools.
  • Constructor Details

    • CommandHelper

      public CommandHelper()
  • Method Details

    • handleExecutionException

      public int handleExecutionException(Exception ex, picocli.CommandLine commandLine, picocli.CommandLine.ParseResult fullParseResult) throws Exception
      Specified by:
      handleExecutionException in interface picocli.CommandLine.IExecutionExceptionHandler
      Throws:
      Exception
    • getVersion

      public String[] getVersion() throws Exception
      Specified by:
      getVersion in interface picocli.CommandLine.IVersionProvider
      Throws:
      Exception
    • info

      public void info(String format, Object... args)
      Prints an informative message on standard output.
      Parameters:
      format - The message to print, as a format string.
      args - Arguments for the format specifiers inside the message.
    • warn

      public void warn(String format, Object... args)
      Prints a warning message on standard output.
      Parameters:
      format - The message to print, as a format string.
      args - Arguments for the format specifiers inside the message.
    • error

      public void error(String format, Object... args)
      Prints an error message on standard output.
      Parameters:
      format - The message to print, as a format string.
      args - Arguments for the format specifiers inside the message.