Class UnsafeAccess
- java.lang.Object
-
- com.github.benmanes.caffeine.base.UnsafeAccess
-
@Deprecated public final class UnsafeAccess extends java.lang.ObjectDeprecated.Scheduled for removal in version 3.0.0Static access toUnsafeand convenient utility methods for performing low-level, unsafe operations.Warning: This class is scheduled for removal in version 3.0.0.
-
-
Constructor Summary
Constructors Modifier Constructor Description privateUnsafeAccess()Deprecated.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description (package private) static sun.misc.Unsafeload(java.lang.String openJdk, java.lang.String android)Deprecated.static longobjectFieldOffset(java.lang.Class<?> clazz, java.lang.String fieldName)Deprecated.Returns the location of a given static field.
-
-
-
Field Detail
-
ANDROID
static final java.lang.String ANDROID
Deprecated.- See Also:
- Constant Field Values
-
OPEN_JDK
static final java.lang.String OPEN_JDK
Deprecated.- See Also:
- Constant Field Values
-
UNSAFE
public static final sun.misc.Unsafe UNSAFE
Deprecated.The Unsafe instance.
-
-
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 fieldfieldName- 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.InvocationTargetExceptionDeprecated.- Throws:
java.lang.NoSuchMethodExceptionjava.lang.InstantiationExceptionjava.lang.IllegalAccessExceptionjava.lang.reflect.InvocationTargetException
-
-