Package com.google.gson.internal.bind
Class ReflectiveTypeAdapterFactory.FieldReflectionAdapter<T>
java.lang.Object
com.google.gson.TypeAdapter<T>
com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.Adapter<T,T>
com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.FieldReflectionAdapter<T>
- Enclosing class:
ReflectiveTypeAdapterFactory
private static final class ReflectiveTypeAdapterFactory.FieldReflectionAdapter<T>
extends ReflectiveTypeAdapterFactory.Adapter<T,T>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFieldReflectionAdapter
(ObjectConstructor<T> constructor, ReflectiveTypeAdapterFactory.FieldsData fieldsData) -
Method Summary
Modifier and TypeMethodDescription(package private) T
Create the Object that will be used to collect each field value(package private) T
Convert the accumulator to a final instance of T.(package private) void
readField
(T accumulator, JsonReader in, ReflectiveTypeAdapterFactory.BoundField field) Read a single BoundField into the accumulator.Methods inherited from class com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.Adapter
read, write
Methods inherited from class com.google.gson.TypeAdapter
fromJson, fromJson, fromJsonTree, nullSafe, toJson, toJson, toJsonTree
-
Field Details
-
constructor
-
-
Constructor Details
-
FieldReflectionAdapter
FieldReflectionAdapter(ObjectConstructor<T> constructor, ReflectiveTypeAdapterFactory.FieldsData fieldsData)
-
-
Method Details
-
createAccumulator
T createAccumulator()Description copied from class:ReflectiveTypeAdapterFactory.Adapter
Create the Object that will be used to collect each field value- Specified by:
createAccumulator
in classReflectiveTypeAdapterFactory.Adapter<T,
T>
-
readField
void readField(T accumulator, JsonReader in, ReflectiveTypeAdapterFactory.BoundField field) throws IllegalAccessException, IOException Description copied from class:ReflectiveTypeAdapterFactory.Adapter
Read a single BoundField into the accumulator. The JsonReader will be pointed at the start of the value for the BoundField to read from.- Specified by:
readField
in classReflectiveTypeAdapterFactory.Adapter<T,
T> - Throws:
IllegalAccessException
IOException
-
finalize
Description copied from class:ReflectiveTypeAdapterFactory.Adapter
Convert the accumulator to a final instance of T.- Specified by:
finalize
in classReflectiveTypeAdapterFactory.Adapter<T,
T>
-