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 the sun.misc.Unsafe object.
  • Method Details

    • javaVersion

      public static float javaVersion()
      Returns the Java version.
      Returns:
      the Java version
    • unsafeStaticFieldOffsetSupported

      public static boolean unsafeStaticFieldOffsetSupported()
      Returns true if access to Unsafe.staticFieldOffset(Field) is supported, false otherwise.
      Returns:
      true if access to Unsafe.staticFieldOffset(Field) is supported, false otherwise