org.opensubsystems.core.util
Class GlobalConstants

java.lang.Object
  extended by org.opensubsystems.core.util.GlobalConstants

public final class GlobalConstants
extends java.lang.Object

Class containing global constants for the system and for the product running this code. Good list of values for system properties can be found at http://www.tolstoy.com/samizdat/sysprops.html

Version:
$Id: GlobalConstants.java,v 1.5 2007/01/07 06:14:00 bastafidli Exp $
Author:
Miro Halas
Code reviewer:
Miro Halas
Code reviewed:
1.3 2005/07/29 07:36:24 bastafidli

Field Summary
static boolean ERROR_CHECKING
          Constant controlling if error checking is performed.
static java.lang.Integer INTEGER_0
          constant for 0 - Integer
static java.lang.Integer INTEGER_1
          constant for 1 - Integer
protected static java.lang.String s_currentOS
          Current operating system.
protected static java.lang.String s_currentOSUpper
          Current operating system.
protected static ProductInfo s_currentProduct
          Information about current product running this code.
protected static java.lang.String s_fileSeparator
          Separator used to separate various elements of a file path.
protected static java.lang.String s_lineSeparator
          End of lines characters used on given platform.
protected static java.lang.String s_strTempDirectory
          System specified temporary directory.
 
Method Summary
static ProductInfo getCurrentProduct()
           
static java.lang.String getFileSeparator()
           
static java.lang.String getLineSeparator()
           
static java.lang.String getTempDirectory()
           
static boolean isLinux()
          Are we running on Linux.
static boolean isWindows()
          Are we running on Windows.
static boolean isWindows9x()
          Are we running on Windows 9X (such as Windows 95, 98, Me).
static void setCurrentProduct(ProductInfo currentProduct)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INTEGER_0

public static final java.lang.Integer INTEGER_0
constant for 0 - Integer


INTEGER_1

public static final java.lang.Integer INTEGER_1
constant for 1 - Integer


ERROR_CHECKING

public static final boolean ERROR_CHECKING
Constant controlling if error checking is performed. If this is changed to false and the whole project is rebuilt, compiler should exclude all error checking to improve performance.

See Also:
Constant Field Values

s_currentProduct

protected static ProductInfo s_currentProduct
Information about current product running this code.


s_currentOS

protected static java.lang.String s_currentOS
Current operating system.


s_currentOSUpper

protected static java.lang.String s_currentOSUpper
Current operating system.


s_lineSeparator

protected static java.lang.String s_lineSeparator
End of lines characters used on given platform.


s_fileSeparator

protected static java.lang.String s_fileSeparator
Separator used to separate various elements of a file path.


s_strTempDirectory

protected static java.lang.String s_strTempDirectory
System specified temporary directory.

Method Detail

getCurrentProduct

public static ProductInfo getCurrentProduct()
Returns:
ProductInfo - information about current product

setCurrentProduct

public static void setCurrentProduct(ProductInfo currentProduct)
Parameters:
currentProduct - - The currentProduct to set.

isLinux

public static boolean isLinux()
Are we running on Linux.

Returns:
boolean

isWindows

public static boolean isWindows()
Are we running on Windows.

Returns:
boolean

isWindows9x

public static boolean isWindows9x()
Are we running on Windows 9X (such as Windows 95, 98, Me).

Returns:
boolean

getLineSeparator

public static java.lang.String getLineSeparator()
Returns:
String - line separator used at current platform

getFileSeparator

public static java.lang.String getFileSeparator()
Returns:
String - file separator used at current platform

getTempDirectory

public static java.lang.String getTempDirectory()
Returns:
String - system specified temporary directory, it is guaranteed to end with file separator


Copyright © 2003 - 2006 OpenSubsystems s.r.o.