uk.ac.starlink.task
Class InvokeUtils

java.lang.Object
  extended by uk.ac.starlink.task.InvokeUtils

public class InvokeUtils
extends Object

Provides some utility functions used by classes which invoke tasks.

Since:
23 Jan 2007
Author:
Mark Taylor

Constructor Summary
InvokeUtils()
           
 
Method Summary
static void configureLogging(int verbosity, boolean debug)
          Sets up the logging system.
static String getJavaVersion()
          Returns the JVM version, without throwing any exceptions.
static String getJavaVM()
          Returns the JVM name and version string, without throwing any exceptions.
static Parameter[] sortParameters(Parameter[] params)
          Sorts a list of Parameter objects.
static void summariseError(Throwable error, 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 String getJavaVersion()
Returns the JVM version, without throwing any exceptions.

Returns:
java version

getJavaVM

public static String getJavaVM()
Returns the JVM name and version string, without throwing any exceptions.

Returns:
JVM description

summariseError

public static void summariseError(Throwable error,
                                  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


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