public final class DetectionUtil
extends java.lang.Object
sun.misc.Unsafe object.
sun.misc.Unsafe if you specify
the System property org.jboss.netty.tryUnsafe with
value of false. Default is true.| Modifier and Type | Field and Description |
|---|---|
private static boolean |
HAS_UNSAFE |
private static boolean |
IS_WINDOWS |
private static int |
JAVA_VERSION |
| Modifier | Constructor and Description |
|---|---|
private |
DetectionUtil() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
hasUnsafe() |
private static boolean |
hasUnsafe(java.lang.ClassLoader loader) |
private static boolean |
hasUnsafeField(java.lang.Class<?> unsafeClass) |
static boolean |
isWindows()
Return
true if the JVM is running on Windows |
static int |
javaVersion() |
private static int |
javaVersion0() |
private static final int JAVA_VERSION
private static final boolean HAS_UNSAFE
private static final boolean IS_WINDOWS
public static boolean isWindows()
true if the JVM is running on Windowspublic static boolean hasUnsafe()
public static int javaVersion()
private static boolean hasUnsafe(java.lang.ClassLoader loader)
private static boolean hasUnsafeField(java.lang.Class<?> unsafeClass)
throws java.security.PrivilegedActionException
java.security.PrivilegedActionExceptionprivate static int javaVersion0()