Package com.google.gson.internal.reflect
Class UnsafeReflectionAccessor
java.lang.Object
com.google.gson.internal.reflect.ReflectionAccessor
com.google.gson.internal.reflect.UnsafeReflectionAccessor
An implementation of
ReflectionAccessor
based on Unsafe
.
NOTE: This implementation is designed for Java 9. Although it should work with earlier Java releases, it is better to
use PreJava9ReflectionAccessor
for them.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static Field
private static Object
void
Does the same asao.setAccessible(true)
, but never throwsInaccessibleObjectException
(package private) boolean
Methods inherited from class com.google.gson.internal.reflect.ReflectionAccessor
getInstance
-
Field Details
-
unsafeClass
-
theUnsafe
-
overrideField
-
-
Constructor Details
-
UnsafeReflectionAccessor
UnsafeReflectionAccessor()
-
-
Method Details
-
makeAccessible
Does the same asao.setAccessible(true)
, but never throwsInaccessibleObjectException
- Specified by:
makeAccessible
in classReflectionAccessor
-
makeAccessibleWithUnsafe
-
getUnsafeInstance
-
getOverrideField
-