Class UnsafeAccess
java.lang.Object
com.github.benmanes.caffeine.cache.UnsafeAccess
Static access to
Unsafe
and convenient utility methods for performing low-level, unsafe
operations.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
ANDROID
- See Also:
-
OPEN_JDK
- See Also:
-
UNSAFE
public static final sun.misc.Unsafe UNSAFEThe Unsafe instance.
-
-
Constructor Details
-
UnsafeAccess
private UnsafeAccess()
-
-
Method Details
-
objectFieldOffset
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(String openJdk, String android) throws NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException
-