Class PathTypeAdapter
java.lang.Object
com.google.gson.TypeAdapter<Path>
eu.cloudnetservice.driver.impl.document.gson.PathTypeAdapter
A type adapter that can serialize and deserialize paths of any type into/from json.
- Since:
- 4.0
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPathTypeAdapter(@NonNull com.google.gson.Gson gsonInstance) Constructs a new instance of the path type adapter. -
Method Summary
Methods inherited from class com.google.gson.TypeAdapter
fromJson, fromJson, fromJsonTree, nullSafe, toJson, toJson, toJsonTree
-
Field Details
-
stringTypeAdapter
-
-
Constructor Details
-
PathTypeAdapter
Constructs a new instance of the path type adapter.- Parameters:
gsonInstance- the gson instance this type adapter instance got bound to.- Throws:
NullPointerException- if the given gson instance is null.
-
-
Method Details
-
write
public void write(@NonNull @NonNull com.google.gson.stream.JsonWriter out, @Nullable @Nullable Path value) throws IOException - Specified by:
writein classcom.google.gson.TypeAdapter<Path>- Throws:
IOException
-
read
@Nullable public @Nullable Path read(@NonNull @NonNull com.google.gson.stream.JsonReader in) throws IOException - Specified by:
readin classcom.google.gson.TypeAdapter<Path>- Throws:
IOException
-