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 final class(package private) static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ReflectionAccessorprivate final ConstructorConstructorprivate final Excluderprivate final FieldNamingStrategyprivate final JsonAdapterAnnotationTypeAdapterFactory -
Constructor Summary
ConstructorsConstructorDescriptionReflectiveTypeAdapterFactory(ConstructorConstructor constructorConstructor, FieldNamingStrategy fieldNamingPolicy, Excluder excluder, JsonAdapterAnnotationTypeAdapterFactory jsonAdapterFactory) -
Method Summary
Modifier and TypeMethodDescription<T> TypeAdapter<T>Returns a type adapter fortype, or null if this factory doesn't supporttype.createBoundField(Gson context, Field field, String name, TypeToken<?> fieldType, boolean serialize, boolean deserialize) booleanexcludeField(Field f, boolean serialize) (package private) static booleanexcludeField(Field f, boolean serialize, Excluder excluder) getBoundFields(Gson context, TypeToken<?> type, Class<?> raw) first element holds the default name
-
Field Details
-
constructorConstructor
-
fieldNamingPolicy
-
excluder
-
jsonAdapterFactory
-
accessor
-
-
Constructor Details
-
ReflectiveTypeAdapterFactory
public ReflectiveTypeAdapterFactory(ConstructorConstructor constructorConstructor, FieldNamingStrategy fieldNamingPolicy, Excluder excluder, JsonAdapterAnnotationTypeAdapterFactory jsonAdapterFactory)
-
-
Method Details
-
excludeField
-
excludeField
-
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
-
createBoundField
private ReflectiveTypeAdapterFactory.BoundField createBoundField(Gson context, Field field, String name, TypeToken<?> fieldType, boolean serialize, boolean deserialize) -
getBoundFields
-