Package com.google.gson.internal
Class ReflectionAccessFilterHelper
- java.lang.Object
-
- com.google.gson.internal.ReflectionAccessFilterHelper
-
public class ReflectionAccessFilterHelper extends java.lang.Object
Internal helper class forReflectionAccessFilter
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
ReflectionAccessFilterHelper.AccessChecker
-
Constructor Summary
Constructors Modifier Constructor Description private
ReflectionAccessFilterHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
canAccess(java.lang.reflect.AccessibleObject accessibleObject, java.lang.Object object)
SeeAccessibleObject#canAccess(Object)
(Java >= 9)static ReflectionAccessFilter.FilterResult
getFilterResult(java.util.List<ReflectionAccessFilter> reflectionFilters, java.lang.Class<?> c)
Gets the result of applying all filters until the first one returns a result other thanReflectionAccessFilter.FilterResult.INDECISIVE
, orReflectionAccessFilter.FilterResult.ALLOW
if the list of filters is empty or all returnedINDECISIVE
.static boolean
isAndroidType(java.lang.Class<?> c)
private static boolean
isAndroidType(java.lang.String className)
static boolean
isAnyPlatformType(java.lang.Class<?> c)
static boolean
isJavaType(java.lang.Class<?> c)
private static boolean
isJavaType(java.lang.String className)
-
-
-
Method Detail
-
isJavaType
public static boolean isJavaType(java.lang.Class<?> c)
-
isJavaType
private static boolean isJavaType(java.lang.String className)
-
isAndroidType
public static boolean isAndroidType(java.lang.Class<?> c)
-
isAndroidType
private static boolean isAndroidType(java.lang.String className)
-
isAnyPlatformType
public static boolean isAnyPlatformType(java.lang.Class<?> c)
-
getFilterResult
public static ReflectionAccessFilter.FilterResult getFilterResult(java.util.List<ReflectionAccessFilter> reflectionFilters, java.lang.Class<?> c)
Gets the result of applying all filters until the first one returns a result other thanReflectionAccessFilter.FilterResult.INDECISIVE
, orReflectionAccessFilter.FilterResult.ALLOW
if the list of filters is empty or all returnedINDECISIVE
.
-
canAccess
public static boolean canAccess(java.lang.reflect.AccessibleObject accessibleObject, java.lang.Object object)
SeeAccessibleObject#canAccess(Object)
(Java >= 9)
-
-