T
- The entity type.public class GsonVdmEntityAdapter<T> extends com.google.gson.TypeAdapter<VdmObject<T>>
Constructor and Description |
---|
GsonVdmEntityAdapter(com.google.gson.TypeAdapterFactory adapterFactory,
com.google.gson.Gson gson,
Class<? super T> entityRawType)
For internal use only by data model classes.
|
Modifier and Type | Method and Description |
---|---|
VdmObject<T> |
read(com.google.gson.stream.JsonReader jsonReader)
For internal use only by data model classes.
|
void |
write(com.google.gson.stream.JsonWriter out,
VdmObject<T> value)
For internal use only by data model classes.
|
public GsonVdmEntityAdapter(@Nonnull com.google.gson.TypeAdapterFactory adapterFactory, @Nonnull com.google.gson.Gson gson, @Nonnull Class<? super T> entityRawType)
adapterFactory
- The adapter type factory.gson
- The GSON instance.entityRawType
- The entity type reference.@Nullable public VdmObject<T> read(@Nonnull com.google.gson.stream.JsonReader jsonReader) throws IOException
read
in class com.google.gson.TypeAdapter<VdmObject<T>>
jsonReader
- The JsonReader reference.IOException
- When deserialization failed.public void write(@Nonnull com.google.gson.stream.JsonWriter out, @Nullable VdmObject<T> value) throws IOException
write
in class com.google.gson.TypeAdapter<VdmObject<T>>
out
- The JsonWriter reference.value
- The entity instance to be serialized.IOException
- When serialization failed.Copyright © 2021 SAP SE. All rights reserved.