Class UnsafeAccess

java.lang.Object
com.github.benmanes.caffeine.base.UnsafeAccess

@Deprecated public final class UnsafeAccess extends 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.

Author:
ben.manes@gmail.com (Ben Manes)
  • Field Details

    • UNSAFE

      public static final sun.misc.Unsafe UNSAFE
      Deprecated.
      The Unsafe instance.
  • Method Details

    • objectFieldOffset

      public static long objectFieldOffset(Class<?> clazz, 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