Module org.eclipse.persistence.core
Enum JavaSEPlatform
- All Implemented Interfaces:
Serializable
,Comparable<JavaSEPlatform>
,java.lang.constant.Constable
Java SE platforms supported by EclipseLink.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final JavaSEPlatform
Current Java SE platform.static final int
GlassFish Java SE platform enumeration length.static final JavaSEPlatform
Lowest supported Java SE platform. -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
atLeast
(JavaSEPlatform platform) Check whether current Java SE is at least (greater or equal) provided platform.final JavaSEPlatform.Version[]
Get additional version numbers.final int
getMajor()
Get major version number.final int
getMinor()
Get minor version number.boolean
gte
(JavaSEPlatform platform) Check if this platform is equal or greater to specified platform.static boolean
is
(JavaSEPlatform platform) Check whether current Java SE is exactly matching provided platform.boolean
Check whether this platform is supported platform.toString()
Return Java SE platform version as human readableString
.static JavaSEPlatform
toValue
(int major, int minor) Returns aJavaSEPlatform
matching providedmajor
andminor
version numbers.static JavaSEPlatform
Returns aJavaSEPlatform
with a value represented by the specifiedString
.static JavaSEPlatform
Returns the enum constant of this type with the specified name.static JavaSEPlatform[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.Return computer readableString
containing version numbers in<major> '.' <minor>
format.static final String
versionString
(int major, int minor) GenerateString
containing minor and major version numbers in<major> '.' <minor>
format.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
Methods inherited from interface java.lang.Comparable
compareTo
-
Enum Constant Details
-
v1_1
Java SE 1.1. -
v1_2
Java SE 1.2. -
v1_3
Java SE 1.3. -
v1_4
Java SE 1.4. -
v1_5
Java SE 1.5. -
v1_6
Java SE 1.6. -
v1_7
Java SE 1.7. -
v1_8
Java SE 1.8. -
v9_0
Java SE 9. Version alias 1.9 is added too. -
v10_0
Java SE 10. -
v11_0
Java SE 11. -
v12_0
Java SE 12. -
v13_0
Java SE 13. -
v14_0
Java SE 14.
-
-
Field Details
-
LENGTH
public static final int LENGTHGlassFish Java SE platform enumeration length. -
MIN_SUPPORTED
Lowest supported Java SE platform. Currently it's Java SE 1.8. -
CURRENT
Current Java SE platform.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
is
Check whether current Java SE is exactly matching provided platform.- Parameters:
platform
- Java SE platform to compare with.
-
atLeast
Check whether current Java SE is at least (greater or equal) provided platform.- Parameters:
platform
- Java SE platform to compare with.
-
toValue
Returns aJavaSEPlatform
with a value represented by the specifiedString
. TheJavaSEPlatform
returned represents existing value only if specifiedString
matches anyString
returned byversionString()
method. Otherwisenull
value is returned.- Parameters:
platformName
- Value containingJavaSEPlatform
versionString
representation.- Returns:
JavaSEPlatform
value represented byString
ornull
if value was not recognized.
-
toValue
Returns aJavaSEPlatform
matching providedmajor
andminor
version numbers.- Parameters:
major
- Major version number.minor
- Minor version number.- Returns:
JavaSEPlatform
value matching providedmajor
andminor
version numbers.JavaSEPlatform.DEFAULT
value is returned for unknown Java SE version numbers.
-
versionString
GenerateString
containing minor and major version numbers in<major> '.' <minor>
format.- Parameters:
major
- Major version number.minor
- Minor version number.- Returns:
- Generated
String
-
getMajor
public final int getMajor()Get major version number.- Returns:
- Major version number.
-
getMinor
public final int getMinor()Get minor version number.- Returns:
- Minor version number.
-
getAdditionalVersions
Get additional version numbers.- Returns:
- an array of additional version numbers if exist or
null
if no additional version numbers are defined.
-
gte
Check if this platform is equal or greater to specified platform.- Parameters:
platform
- Platform to compare with.- Returns:
- Value of
true
if this platform is equal or greater to specified platform orfalse
otherwise.
-
isSupported
public boolean isSupported()Check whether this platform is supported platform.- Returns:
- Value of
true
when this platform is supported platform orfalse
otherwise.
-
versionString
Return computer readableString
containing version numbers in<major> '.' <minor>
format.- Returns:
- computer readable
String
containing version numbers
-
toString
Return Java SE platform version as human readableString
.- Overrides:
toString
in classEnum<JavaSEPlatform>
- Returns:
- Java SE platform version as human readable
String
.
-