public class GlobalIdTypeAdapter extends Object implements JsonTypeAdapter<GlobalId>
| Constructor and Description |
|---|
GlobalIdTypeAdapter(GlobalIdFactory globalIdFactory,
TypeMapper typeMapper) |
| Modifier and Type | Method and Description |
|---|---|
GlobalId |
fromJson(com.google.gson.JsonElement json,
com.google.gson.JsonDeserializationContext context) |
List<Class> |
getValueTypes()
Target classes.
|
com.google.gson.JsonElement |
toJson(GlobalId globalId,
com.google.gson.JsonSerializationContext context) |
public GlobalIdTypeAdapter(GlobalIdFactory globalIdFactory, TypeMapper typeMapper)
public GlobalId fromJson(com.google.gson.JsonElement json, com.google.gson.JsonDeserializationContext context)
fromJson in interface JsonTypeAdapter<GlobalId>json - not null and not JsonNullcontext - use it to invoke default deserialization on the specified objectpublic com.google.gson.JsonElement toJson(GlobalId globalId, com.google.gson.JsonSerializationContext context)
toJson in interface JsonTypeAdapter<GlobalId>globalId - not nullcontext - use it to invoke default serialization on the specified objectpublic List<Class> getValueTypes()
JsonTypeAdaptergetValueTypes in interface JsonTypeAdapter<GlobalId>Copyright © 2014. All rights reserved.