Module com.google.gson
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
-
Fields inherited from class com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.Adapter
boundFields
-
-
Constructor Summary
Constructors Constructor Description FieldReflectionAdapter(ObjectConstructor<T> constructor, java.util.Map<java.lang.String,ReflectiveTypeAdapterFactory.BoundField> boundFields)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) T
createAccumulator()
Create the Object that will be used to collect each field value(package private) T
finalize(T accumulator)
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 Detail
-
constructor
private final ObjectConstructor<T> constructor
-
-
Constructor Detail
-
FieldReflectionAdapter
FieldReflectionAdapter(ObjectConstructor<T> constructor, java.util.Map<java.lang.String,ReflectiveTypeAdapterFactory.BoundField> boundFields)
-
-
Method Detail
-
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 java.lang.IllegalAccessException, java.io.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:
java.lang.IllegalAccessException
java.io.IOException
-
finalize
T finalize(T accumulator)
Description copied from class:ReflectiveTypeAdapterFactory.Adapter
Convert the accumulator to a final instance of T.- Specified by:
finalize
in classReflectiveTypeAdapterFactory.Adapter<T,T>
-
-