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 Modifier and Type Field Description private ObjectConstructor<T>constructor
-
Constructor Summary
Constructors Constructor Description FieldReflectionAdapter(ObjectConstructor<T> constructor, ReflectiveTypeAdapterFactory.FieldsData fieldsData)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) TcreateAccumulator()Create the Object that will be used to collect each field value(package private) Tfinalize(T accumulator)Convert the accumulator to a final instance of T.(package private) voidreadField(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 Detail
-
constructor
private final ObjectConstructor<T> constructor
-
-
Constructor Detail
-
FieldReflectionAdapter
FieldReflectionAdapter(ObjectConstructor<T> constructor, ReflectiveTypeAdapterFactory.FieldsData fieldsData)
-
-
Method Detail
-
createAccumulator
T createAccumulator()
Description copied from class:ReflectiveTypeAdapterFactory.AdapterCreate the Object that will be used to collect each field value- Specified by:
createAccumulatorin classReflectiveTypeAdapterFactory.Adapter<T,T>
-
readField
void readField(T accumulator, JsonReader in, ReflectiveTypeAdapterFactory.BoundField field) throws java.lang.IllegalAccessException, java.io.IOException
Description copied from class:ReflectiveTypeAdapterFactory.AdapterRead 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:
readFieldin classReflectiveTypeAdapterFactory.Adapter<T,T>- Throws:
java.lang.IllegalAccessExceptionjava.io.IOException
-
finalize
T finalize(T accumulator)
Description copied from class:ReflectiveTypeAdapterFactory.AdapterConvert the accumulator to a final instance of T.- Specified by:
finalizein classReflectiveTypeAdapterFactory.Adapter<T,T>
-
-