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.voidwrite(@NotNull com.google.gson.stream.JsonWriter writer, @NotNull IMuteEntry entry) Writes the givenIMuteEntryobject 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 givenIMuteEntryobject to the providedJsonWriter.- Specified by:
writein 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:
readin 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
-