uk.ac.starlink.task

## Class InvokeUtils

- java.lang.Object
- - uk.ac.starlink.task.InvokeUtils

-     public class InvokeUtils
      extends java.lang.Object

  Provides some utility functions used by classes which invoke tasks.
  Since:
    23 Jan 2007
  Author:
    Mark Taylor

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `InvokeUtils()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `configureLogging(int verbosity, boolean debug)` Sets up the logging system.
    `static java.lang.String` | `getJavaVersion()` Returns the JVM version, without throwing any exceptions.
    `static java.lang.String` | `getJavaVM()` Returns the JVM name and version string, without throwing any exceptions.
    `static void` | `main(java.lang.String[] args)` Invokes the main method of a named class with logging configuration specified on the command line.
    `static Parameter[]` | `sortParameters(Parameter[] params)` Sorts a list of Parameter objects.
    `static void` | `summariseError(java.lang.Throwable error, java.io.PrintStream out)` Writes a summary of a (possibly nested) exception to a given output stream.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### InvokeUtils

          public InvokeUtils()

  - ### Method Detail

    - #### configureLogging

          public static void configureLogging(int verbosity,
                                              boolean debug)

      Sets up the logging system.
      Parameters:
        `verbosity` - number of levels greater than default to set
        `debug` - whether debugging mode is on

    - #### getJavaVersion

          public static java.lang.String getJavaVersion()

      Returns the JVM version, without throwing any exceptions.
      Returns:
        java version

    - #### getJavaVM

          public static java.lang.String getJavaVM()

      Returns the JVM name and version string, without throwing any exceptions.
      Returns:
        JVM description

    - #### summariseError

          public static void summariseError(java.lang.Throwable error,
                                            java.io.PrintStream out)

      Writes a summary of a (possibly nested) exception to a given output stream.
      Parameters:
        `error` - exception
        `out` - destination stream

    - #### sortParameters

          public static Parameter[] sortParameters(Parameter[] params)

      Sorts a list of Parameter objects. Numbered ones are followed by unnumbered ones.
      Parameters:
        `params` - input list
      Returns:
        output list

    - #### main

          public static void main(java.lang.String[] args)
                           throws java.lang.Throwable

      Invokes the main method of a named class with logging configuration specified on the command line. The -verbose/+verbose flags and the -debug flag may be supplied before the target classname and arguments.
      Throws:
        `java.lang.Throwable`

Copyright © 2017 Central Laboratory of the Research Councils. All Rights Reserved.