Package google.registry.model.adapters
Class ClassTypeAdapter
java.lang.Object
com.google.gson.TypeAdapter<Class<?>>
google.registry.model.adapters.ClassTypeAdapter
TypeAdapter for
Class
objects.
GSON's default adapter doesn't allow this, but we want to allow for (de)serialization of Class objects for containers like VKeys using the full name of the class.
-
Constructor Summary
-
Method Summary
Methods inherited from class com.google.gson.TypeAdapter
fromJson, fromJson, fromJsonTree, nullSafe, toJson, toJson, toJsonTree
-
Constructor Details
-
ClassTypeAdapter
public ClassTypeAdapter()
-
-
Method Details
-
write
- Specified by:
write
in classcom.google.gson.TypeAdapter<Class<?>>
- Throws:
IOException
-
read
- Specified by:
read
in classcom.google.gson.TypeAdapter<Class<?>>
- Throws:
IOException
-