org.glassfish.jersey.internal.util
Class JdkVersion

java.lang.Object
  extended by org.glassfish.jersey.internal.util.JdkVersion
All Implemented Interfaces:
Comparable<JdkVersion>

public class JdkVersion
extends Object
implements Comparable<JdkVersion>

JDK Version related utilities. Ported from Grizzly project.

Since:
2.3
Author:
Ryan Lubke (ryan.lubke at oracle.com), Alexey Stashok (oleksiy.stashok at oracle.com)

Method Summary
 int compareTo(JdkVersion otherVersion)
           
 int compareTo(String versionString)
           
static JdkVersion getJdkVersion()
           
 int getMaintenance()
           
 int getMajor()
           
 int getMinor()
           
 int getUpdate()
           
 boolean isUnsafeSupported()
          Returns true if sun.misc.Unsafe is present in the current JDK version, or false otherwise.
static void main(String[] args)
           
static JdkVersion parseVersion(String versionString)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

parseVersion

public static JdkVersion parseVersion(String versionString)

getJdkVersion

public static JdkVersion getJdkVersion()

getMajor

public int getMajor()

getMinor

public int getMinor()

getMaintenance

public int getMaintenance()

getUpdate

public int getUpdate()

isUnsafeSupported

public boolean isUnsafeSupported()
Returns true if sun.misc.Unsafe is present in the current JDK version, or false otherwise.

Since:
2.3.6

toString

public String toString()
Overrides:
toString in class Object

compareTo

public int compareTo(String versionString)

compareTo

public int compareTo(JdkVersion otherVersion)
Specified by:
compareTo in interface Comparable<JdkVersion>

main

public static void main(String[] args)


Copyright © 2007-2013, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.