Package org.drasyl.util
Class PlatformDependent
- java.lang.Object
-
- org.drasyl.util.PlatformDependent
-
public final class PlatformDependent extends Object
Utility class that can be used to detect properties specific to the current runtime environment, such as Java version and the availability of thesun.misc.Unsafe
object.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static float
javaVersion()
Returns the Java version.static boolean
unsafeStaticFieldOffsetSupported()
Returnstrue
if access toUnsafe.staticFieldOffset(Field)
is supported,false
otherwise.
-
-
-
Method Detail
-
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
-
-