Package org.drasyl.util
Class PlatformDependent
java.lang.Object
org.drasyl.util.PlatformDependent
Utility class that can be used to detect properties specific to the current runtime environment,
such as Java version and the availability of the
sun.misc.Unsafe object.-
Method Summary
Modifier and TypeMethodDescriptionstatic floatReturns the Java version.static booleanReturnstrueif access toUnsafe.staticFieldOffset(Field)is supported,falseotherwise.
-
Method Details
-
javaVersion
public static float javaVersion()Returns the Java version.- Returns:
- the Java version
-
unsafeStaticFieldOffsetSupported
public static boolean unsafeStaticFieldOffsetSupported()Returnstrueif access toUnsafe.staticFieldOffset(Field)is supported,falseotherwise.- Returns:
trueif access toUnsafe.staticFieldOffset(Field)is supported,falseotherwise
-