Class UnsafeAccess


  • @Deprecated
    public final class UnsafeAccess
    extends java.lang.Object
    Deprecated.
    Scheduled for removal in version 3.0.0
    Static access to Unsafe and convenient utility methods for performing low-level, unsafe operations.

    Warning: This class is scheduled for removal in version 3.0.0.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) static java.lang.String ANDROID
      Deprecated.
       
      (package private) static java.lang.String OPEN_JDK
      Deprecated.
       
      static sun.misc.Unsafe UNSAFE
      Deprecated.
      The Unsafe instance.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private UnsafeAccess()
      Deprecated.
       
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      (package private) static sun.misc.Unsafe load​(java.lang.String openJdk, java.lang.String android)
      Deprecated.
       
      static long objectFieldOffset​(java.lang.Class<?> clazz, java.lang.String fieldName)
      Deprecated.
      Returns the location of a given static field.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • UNSAFE

        public static final sun.misc.Unsafe UNSAFE
        Deprecated.
        The Unsafe instance.
    • Constructor Detail

      • UnsafeAccess

        private UnsafeAccess()
        Deprecated.
    • Method Detail

      • objectFieldOffset

        public static long objectFieldOffset​(java.lang.Class<?> clazz,
                                             java.lang.String fieldName)
        Deprecated.
        Returns the location of a given static field.
        Parameters:
        clazz - the class containing the field
        fieldName - the name of the field
        Returns:
        the address offset of the field
      • load

        static sun.misc.Unsafe load​(java.lang.String openJdk,
                                    java.lang.String android)
                             throws java.lang.NoSuchMethodException,
                                    java.lang.InstantiationException,
                                    java.lang.IllegalAccessException,
                                    java.lang.reflect.InvocationTargetException
        Deprecated.
        Throws:
        java.lang.NoSuchMethodException
        java.lang.InstantiationException
        java.lang.IllegalAccessException
        java.lang.reflect.InvocationTargetException