Package com.google.gson.internal.bind
Class ReflectiveTypeAdapterFactory.RecordAdapter<T>
java.lang.Object
com.google.gson.TypeAdapter<T>
com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.Adapter<T,Object[]>
com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.RecordAdapter<T>
- Enclosing class:
ReflectiveTypeAdapterFactory
private static final class ReflectiveTypeAdapterFactory.RecordAdapter<T>
extends ReflectiveTypeAdapterFactory.Adapter<T,Object[]>
-
Field Summary
FieldsFields inherited from class com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.Adapter
boundFields -
Constructor Summary
ConstructorsConstructorDescriptionRecordAdapter(Class<T> raw, Map<String, ReflectiveTypeAdapterFactory.BoundField> boundFields, boolean blockInaccessible) -
Method Summary
Modifier and TypeMethodDescription(package private) Object[]Create the Object that will be used to collect each field value(package private) TConvert the accumulator to a final instance of T.(package private) voidreadField(Object[] 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, writeMethods inherited from class com.google.gson.TypeAdapter
fromJson, fromJson, fromJsonTree, nullSafe, toJson, toJson, toJsonTree
-
Field Details
-
PRIMITIVE_DEFAULTS
-
constructor
-
constructorArgsDefaults
-
componentIndices
-
-
Constructor Details
-
RecordAdapter
RecordAdapter(Class<T> raw, Map<String, ReflectiveTypeAdapterFactory.BoundField> boundFields, boolean blockInaccessible)
-
-
Method Details
-
primitiveDefaults
-
createAccumulator
Object[] createAccumulator()Description copied from class:ReflectiveTypeAdapterFactory.AdapterCreate the Object that will be used to collect each field value- Specified by:
createAccumulatorin classReflectiveTypeAdapterFactory.Adapter<T,Object[]>
-
readField
void readField(Object[] accumulator, JsonReader in, ReflectiveTypeAdapterFactory.BoundField field) throws 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,Object[]> - Throws:
IOException
-
finalize
Description copied from class:ReflectiveTypeAdapterFactory.AdapterConvert the accumulator to a final instance of T.- Specified by:
finalizein classReflectiveTypeAdapterFactory.Adapter<T,Object[]>
-