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 float
Returns the Java version.static boolean
Returnstrue
if access toUnsafe.staticFieldOffset(Field)
is supported,false
otherwise.
-
Method Details
-
javaVersion
public static float javaVersion()Returns the Java version.- Returns:
- the Java version
-
unsafeStaticFieldOffsetSupported
public static boolean unsafeStaticFieldOffsetSupported()Returnstrue
if access toUnsafe.staticFieldOffset(Field)
is supported,false
otherwise.- Returns:
true
if access toUnsafe.staticFieldOffset(Field)
is supported,false
otherwise
-