Class MuteEntry.IMuteEntryAdapter
java.lang.Object
com.google.gson.TypeAdapter<IMuteEntry>
me.github.simonplays15.betterbansystem.core.mute.MuteEntry.IMuteEntryAdapter
- Enclosing class:
- MuteEntry
The IMuteEntryAdapter class is a Gson TypeAdapter for serializing and deserializing
IMuteEntry objects.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionread
(@NotNull com.google.gson.stream.JsonReader reader) Reads the JSON representation of an IMuteEntry from a JsonReader and constructs a new IMuteEntry object.void
write
(@NotNull com.google.gson.stream.JsonWriter writer, @NotNull IMuteEntry entry) Writes the givenIMuteEntry
object to the providedJsonWriter
.Methods inherited from class com.google.gson.TypeAdapter
fromJson, fromJson, fromJsonTree, nullSafe, toJson, toJson, toJsonTree
-
Constructor Details
-
IMuteEntryAdapter
public IMuteEntryAdapter()
-
-
Method Details
-
write
public void write(@NotNull @NotNull com.google.gson.stream.JsonWriter writer, @NotNull @NotNull IMuteEntry entry) throws IOException Writes the givenIMuteEntry
object to the providedJsonWriter
.- Specified by:
write
in classcom.google.gson.TypeAdapter<IMuteEntry>
- Parameters:
writer
- the JSON writer to write the mute entry object toentry
- the mute entry object to be written- Throws:
IOException
- if an I/O error occurs during the write operation
-
read
public IMuteEntry read(@NotNull @NotNull com.google.gson.stream.JsonReader reader) throws IOException Reads the JSON representation of an IMuteEntry from a JsonReader and constructs a new IMuteEntry object.- Specified by:
read
in classcom.google.gson.TypeAdapter<IMuteEntry>
- Parameters:
reader
- the JsonReader from which to read the JSON representation- Returns:
- a new IMuteEntry object constructed from the JSON representation
- Throws:
IOException
- if an I/O error occurs while reading the JSON representation
-