Package com.google.gson.internal.bind
Class ReflectiveTypeAdapterFactory.BoundField
- java.lang.Object
-
- com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.BoundField
-
- Enclosing class:
- ReflectiveTypeAdapterFactory
abstract static class ReflectiveTypeAdapterFactory.BoundField extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.lang.reflect.Fieldfield(package private) java.lang.StringfieldNameName of the underlying field(package private) java.lang.StringserializedNameName used for serialization (but not for deserialization)
-
Constructor Summary
Constructors Modifier Constructor Description protectedBoundField(java.lang.String serializedName, java.lang.reflect.Field field)
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description (package private) abstract voidreadIntoArray(JsonReader reader, int index, java.lang.Object[] target)Read the value into the target array, used to provide constructor arguments for records(package private) abstract voidreadIntoField(JsonReader reader, java.lang.Object target)Read the value from the reader, and set it on the corresponding field on target via reflection(package private) abstract voidwrite(JsonWriter writer, java.lang.Object source)Read this field value from the source, and append its JSON value to the writer
-
-
-
Method Detail
-
write
abstract void write(JsonWriter writer, java.lang.Object source) throws java.io.IOException, java.lang.IllegalAccessException
Read this field value from the source, and append its JSON value to the writer- Throws:
java.io.IOExceptionjava.lang.IllegalAccessException
-
readIntoArray
abstract void readIntoArray(JsonReader reader, int index, java.lang.Object[] target) throws java.io.IOException, JsonParseException
Read the value into the target array, used to provide constructor arguments for records- Throws:
java.io.IOExceptionJsonParseException
-
readIntoField
abstract void readIntoField(JsonReader reader, java.lang.Object target) throws java.io.IOException, java.lang.IllegalAccessException
Read the value from the reader, and set it on the corresponding field on target via reflection- Throws:
java.io.IOExceptionjava.lang.IllegalAccessException
-
-