org.datanucleus.util
Class JavaUtils

java.lang.Object
  extended by org.datanucleus.util.JavaUtils

public class JavaUtils
extends java.lang.Object

Utilities relating to the version of Java in use at runtime.

Version:
$Revision: 1.8 $

Constructor Summary
JavaUtils()
           
 
Method Summary
static int getJREMajorVersion()
          Accessor for the major version number of the JRE.
static int getJREMinorVersion()
          Accessor for the minor version number of the JRE.
static boolean isEqualsThan(java.lang.String version)
          Check if the current version is equals than the argument version.
static boolean isGreaterEqualsThan(java.lang.String version)
          Check if the current version is greater or equals than the argument version.
static boolean isJRE1_4OrAbove()
          Accessor for whether the JRE is 1.4 (or above).
static boolean isJRE1_5OrAbove()
          Accessor for whether the JRE is 1.5 (or above).
static boolean isJRE1_6OrAbove()
          Accessor for whether the JRE is 1.6 (or above).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaUtils

public JavaUtils()
Method Detail

isJRE1_4OrAbove

public static boolean isJRE1_4OrAbove()
Accessor for whether the JRE is 1.4 (or above). Checks for the presence of a known 1.4 class.

Returns:
Whether the JRE is 1.4 or above

isJRE1_5OrAbove

public static boolean isJRE1_5OrAbove()
Accessor for whether the JRE is 1.5 (or above). Checks for the presence of a known 1.5 class.

Returns:
Whether the JRE is 1.5 or above

isJRE1_6OrAbove

public static boolean isJRE1_6OrAbove()
Accessor for whether the JRE is 1.6 (or above). Checks for the presence of a known 1.6 class.

Returns:
Whether the JRE is 1.6 or above

getJREMajorVersion

public static int getJREMajorVersion()
Accessor for the major version number of the JRE.

Returns:
The major version number of the JRE

getJREMinorVersion

public static int getJREMinorVersion()
Accessor for the minor version number of the JRE.

Returns:
The minor version number of the JRE

isGreaterEqualsThan

public static boolean isGreaterEqualsThan(java.lang.String version)
Check if the current version is greater or equals than the argument version.

Parameters:
version - the version
Returns:
true if the runtime version is greater equals than the argument

isEqualsThan

public static boolean isEqualsThan(java.lang.String version)
Check if the current version is equals than the argument version.

Parameters:
version - the version
Returns:
true if the runtime version is equals than the argument


Copyright © 2009. All Rights Reserved.