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) T
Convert the accumulator to a final instance of T.(package private) void
readField
(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, write
Methods 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.Adapter
Create the Object that will be used to collect each field value- Specified by:
createAccumulator
in classReflectiveTypeAdapterFactory.Adapter<T,
Object[]>
-
readField
void readField(Object[] accumulator, JsonReader in, ReflectiveTypeAdapterFactory.BoundField field) throws 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,
Object[]> - Throws:
IOException
-
finalize
Description copied from class:ReflectiveTypeAdapterFactory.Adapter
Convert the accumulator to a final instance of T.- Specified by:
finalize
in classReflectiveTypeAdapterFactory.Adapter<T,
Object[]>
-