Package cambio.simulator.parsing.adapter
Class FileAdapter
java.lang.Object
com.google.gson.TypeAdapter<File>
cambio.simulator.parsing.adapter.FileAdapter
Gson
TypeAdapter
for the File
type.
This adapter is mandatory since Javas' stricter reflection rules. This adapter converts File
s to String
s and vise-versa using the files' absolut path.
- Author:
- Lion Wagner
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.google.gson.TypeAdapter
fromJson, fromJson, fromJsonTree, nullSafe, toJson, toJson, toJsonTree
-
Constructor Details
-
FileAdapter
public FileAdapter()
-
-
Method Details
-
write
- Specified by:
write
in classcom.google.gson.TypeAdapter<File>
- Throws:
IOException
-
read
- Specified by:
read
in classcom.google.gson.TypeAdapter<File>
- Throws:
IOException
-