Package org.eclipse.persistence
Class Version
- java.lang.Object
-
- org.eclipse.persistence.Version
-
public class Version extends java.lang.Object
This class stores variables for the version and build numbers that are used in printouts and exceptions.- Author:
- Eric Gwin
- Since:
- 1.0,
-
-
Field Summary
Fields Modifier and Type Field Description static int
JDK_1_5
Deprecated.UseJavaSEPlatform
instead.static int
JDK_1_6
Deprecated.UseJavaSEPlatform
instead.static int
JDK_1_7
Deprecated.UseJavaSEPlatform
instead.static int
JDK_1_8
Deprecated.UseJavaSEPlatform
instead.static int
JDK_1_9
Deprecated.UseJavaSEPlatform
instead.static int
JDK_VERSION
Deprecated.UseJavaSEPlatform
instead.static int
JDK_VERSION_NOT_SET
Deprecated.UseJavaSEPlatform
instead.
-
Constructor Summary
Constructors Constructor Description Version()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.lang.String
getBuildDate()
static java.lang.String
getBuildNumber()
static java.lang.String
getBuildRevision()
static java.lang.String
getBuildTime()
static java.lang.String
getBuildType()
static int
getJDKVersion()
Deprecated.UseJavaSEPlatform.CURRENT
instead.static java.lang.String
getProduct()
static java.lang.String
getQualifier()
static java.lang.String
getVersion()
static java.lang.String
getVersionString()
Returns versionString
containing three part version number and build qualifier.static boolean
isJDK15()
Check whether we are running on Java SE 1.5.static boolean
isJDK16()
Check whether we are running on Java SE 1.6.static boolean
isJDK17()
Check whether we are running on Java SE 1.7.static boolean
isJDK18()
Check whether we are running on Java SE 1.8.static boolean
isJDK19()
Check whether we are running on Java SE 1.9.static void
main(java.lang.String[] args)
static void
printVersion()
static void
setProduct(java.lang.String ProductName)
static void
useJDK15()
Deprecated.UseJavaSEPlatform
instead.static void
useJDK16()
Deprecated.UseJavaSEPlatform
instead.
-
-
-
Field Detail
-
JDK_VERSION_NOT_SET
@Deprecated public static final int JDK_VERSION_NOT_SET
Deprecated.UseJavaSEPlatform
instead. Will be removed in 2.7.Keep track of JDK version in order to make some decisions about data structures.- See Also:
- Constant Field Values
-
JDK_1_5
@Deprecated public static final int JDK_1_5
Deprecated.UseJavaSEPlatform
instead. Will be removed in 2.7.- See Also:
- Constant Field Values
-
JDK_1_6
@Deprecated public static final int JDK_1_6
Deprecated.UseJavaSEPlatform
instead. Will be removed in 2.7.- See Also:
- Constant Field Values
-
JDK_1_7
@Deprecated public static final int JDK_1_7
Deprecated.UseJavaSEPlatform
instead. Will be removed in 2.7.- See Also:
- Constant Field Values
-
JDK_1_8
@Deprecated public static final int JDK_1_8
Deprecated.UseJavaSEPlatform
instead. Will be removed in 2.7.- See Also:
- Constant Field Values
-
JDK_1_9
@Deprecated public static final int JDK_1_9
Deprecated.UseJavaSEPlatform
instead. Will be removed in 2.7.- See Also:
- Constant Field Values
-
JDK_VERSION
@Deprecated public static int JDK_VERSION
Deprecated.UseJavaSEPlatform
instead. Will be removed in 2.7.
-
-
Method Detail
-
getVersionString
public static java.lang.String getVersionString()
Returns versionString
containing three part version number and build qualifier.- Returns:
- Version
String
.
-
getProduct
public static java.lang.String getProduct()
-
setProduct
public static void setProduct(java.lang.String ProductName)
-
getVersion
public static java.lang.String getVersion()
-
getQualifier
public static java.lang.String getQualifier()
-
getBuildNumber
public static java.lang.String getBuildNumber()
-
getBuildDate
public static java.lang.String getBuildDate()
-
getBuildTime
public static java.lang.String getBuildTime()
-
getBuildRevision
public static java.lang.String getBuildRevision()
-
getBuildType
public static java.lang.String getBuildType()
-
getJDKVersion
@Deprecated public static int getJDKVersion()
Deprecated.UseJavaSEPlatform.CURRENT
instead. Will be removed in 2.7.INTERNAL: Return the JDK version we are using.
-
useJDK15
@Deprecated public static void useJDK15()
Deprecated.UseJavaSEPlatform
instead. Will be removed in 2.7.Set 1.5 as current Java SE version.- Throws:
java.lang.UnsupportedOperationException
- when invoked because Java SE 1.5 is not supported by current EclipseLink.
-
useJDK16
@Deprecated public static void useJDK16()
Deprecated.UseJavaSEPlatform
instead. Will be removed in 2.7.Set 1.6 as current Java SE version.- Throws:
java.lang.UnsupportedOperationException
- when invoked because Java SE 1.6 is not supported by current EclipseLink.
-
isJDK15
public static boolean isJDK15()
Check whether we are running on Java SE 1.5. This will always returnfalse
because Java SE 1.5 is not supported by current EclipseLink.- Returns:
- Value of
true
when we do and value offalse
when we do not run on Java SE 1.5.
-
isJDK16
public static boolean isJDK16()
Check whether we are running on Java SE 1.6. This will always returnfalse
because Java SE 1.6 is not supported by current EclipseLink.- Returns:
- Value of
true
when we do and value offalse
when we do not run on Java SE 1.6.
-
isJDK17
public static boolean isJDK17()
Check whether we are running on Java SE 1.7.- Returns:
- Value of
true
when we do and value offalse
when we do not run on Java SE 1.7.
-
isJDK18
public static boolean isJDK18()
Check whether we are running on Java SE 1.8.- Returns:
- Value of
true
when we do and value offalse
when we do not run on Java SE 1.8.
-
isJDK19
public static boolean isJDK19()
Check whether we are running on Java SE 1.9.- Returns:
- Value of
true
when we do and value offalse
when we do not run on Java SE 1.9.
-
printVersion
public static void printVersion()
-
main
public static void main(java.lang.String[] args)
-
-