util
Class SysInfo

java.lang.Object
  extended by util.SysInfo

public class SysInfo
extends java.lang.Object

Utility class for returning a processed system property. The properties are processed as follows: First all the points in this property are replaced with dashes and then the substring from the start to the first character that is not a letter, a digit, a dash or an underscore is taken. If we take, for instance, the system property os.name on Mac OS X, this will be Mac OS X, but the method get will return Mac.

This class is not only used by the CaGe program but also in the installation script. This package is packed into a separate jar named sysinfo.jar .


Method Summary
static java.lang.String get(java.lang.String propertyName)
          Returns the system property with the name propertyName.
static void main(java.lang.String[] argv)
          Main method that allows this class to be run from the command line.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

get

public static java.lang.String get(java.lang.String propertyName)
Returns the system property with the name propertyName. First all the points in this property are replaced with dashes and then the substring from the start to the first character that is not a letter, a digit, a dash or an underscore is returned, unless this string has length 0 in which case null is returned.

Parameters:
propertyName - The name of the system property that should be returned
Returns:
The processed system property for the given name

main

public static void main(java.lang.String[] argv)
Main method that allows this class to be run from the command line. It requires at least one argument, and will fail when this is not the case. The system property with the name equal to the first argument will be printed to standard out if such a property exists, otherwise nothing will happen.

Parameters:
argv - An array containing at least one element.
See Also:
get(java.lang.String)