Class ActionAdapter
java.lang.Object
com.google.gson.TypeAdapter<Action>
dev.foxikle.customnpcs.actions.conditions.ActionAdapter
A TypeAdapter for Gson
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.google.gson.TypeAdapter
fromJson, fromJson, fromJsonTree, nullSafe, toJson, toJson, toJsonTree
-
Constructor Details
-
ActionAdapter
public ActionAdapter()
-
-
Method Details
-
write
Serializes the Action object to json- Specified by:
write
in classcom.google.gson.TypeAdapter<Action>
- Parameters:
out
- The json writervalue
- the Java object to write. May be null.- Throws:
IOException
- if an IOException occours
-
read
deserializes an Action- Specified by:
read
in classcom.google.gson.TypeAdapter<Action>
- Parameters:
in
- the object, in reader form- Returns:
- the deserialized action
- Throws:
IOException
- if an error occoured
-