Package com.google.gson.internal.bind
Class ReflectiveTypeAdapterFactory
java.lang.Object
com.google.gson.internal.bind.ReflectiveTypeAdapterFactory
- All Implemented Interfaces:
TypeAdapterFactory
Type adapter that reflects over the fields and methods of a class.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBase class for Adapters produced by this factory.(package private) static classprivate static final classprivate static final class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ConstructorConstructorprivate final Excluderprivate final FieldNamingStrategyprivate final JsonAdapterAnnotationTypeAdapterFactoryprivate final List<ReflectionAccessFilter> -
Constructor Summary
ConstructorsConstructorDescriptionReflectiveTypeAdapterFactory(ConstructorConstructor constructorConstructor, FieldNamingStrategy fieldNamingPolicy, Excluder excluder, JsonAdapterAnnotationTypeAdapterFactory jsonAdapterFactory, List<ReflectionAccessFilter> reflectionFilters) -
Method Summary
Modifier and TypeMethodDescriptionprivate static <M extends AccessibleObject & Member>
voidcheckAccessible(Object object, M member) <T> TypeAdapter<T> Returns a type adapter fortype, or null if this factory doesn't supporttype.createBoundField(Gson context, Field field, Method accessor, String name, TypeToken<?> fieldType, boolean serialize, boolean deserialize, boolean blockInaccessible) getBoundFields(Gson context, TypeToken<?> type, Class<?> raw, boolean blockInaccessible, boolean isRecord) first element holds the default nameprivate booleanincludeField(Field f, boolean serialize)
-
Field Details
-
constructorConstructor
-
fieldNamingPolicy
-
excluder
-
jsonAdapterFactory
-
reflectionFilters
-
-
Constructor Details
-
ReflectiveTypeAdapterFactory
public ReflectiveTypeAdapterFactory(ConstructorConstructor constructorConstructor, FieldNamingStrategy fieldNamingPolicy, Excluder excluder, JsonAdapterAnnotationTypeAdapterFactory jsonAdapterFactory, List<ReflectionAccessFilter> reflectionFilters)
-
-
Method Details
-
includeField
-
getFieldNames
first element holds the default name -
create
Description copied from interface:TypeAdapterFactoryReturns a type adapter fortype, or null if this factory doesn't supporttype.- Specified by:
createin interfaceTypeAdapterFactory
-
checkAccessible
-
createBoundField
-
getBoundFields
-