Class MuteEntry.IMuteEntryAdapter

java.lang.Object
com.google.gson.TypeAdapter<IMuteEntry>
me.github.simonplays15.betterbansystem.core.mute.MuteEntry.IMuteEntryAdapter
Enclosing class:
MuteEntry

public static class MuteEntry.IMuteEntryAdapter extends com.google.gson.TypeAdapter<IMuteEntry>
The IMuteEntryAdapter class is a Gson TypeAdapter for serializing and deserializing IMuteEntry objects.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    read (@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 given IMuteEntry object to the provided JsonWriter.

    Methods inherited from class com.google.gson.TypeAdapter

    fromJson, fromJson, fromJsonTree, nullSafe, toJson, toJson, toJsonTree

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 given IMuteEntry object to the provided JsonWriter.
      Specified by:
      write in class com.google.gson.TypeAdapter<IMuteEntry>
      Parameters:
      writer - the JSON writer to write the mute entry object to
      entry - 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 class com.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