Class IPBanEntry.IIPBanEntryAdapter

java.lang.Object
com.google.gson.TypeAdapter<IIPBanEntry>
me.github.simonplays15.betterbansystem.core.ban.IPBanEntry.IIPBanEntryAdapter
Enclosing class:
IPBanEntry

public static class IPBanEntry.IIPBanEntryAdapter extends com.google.gson.TypeAdapter<IIPBanEntry>
The IIPBanEntryAdapter class is a Gson TypeAdapter for serializing and deserializing IIPBanEntry objects.
Since:
1.0.0
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    read (@NotNull com.google.gson.stream.JsonReader reader)
    Reads a JSON object from a JsonReader and returns an instance of IIPBanEntry.
    void
    write (@NotNull com.google.gson.stream.JsonWriter writer, @NotNull IIPBanEntry entry)
    Writes an IIPBanEntry object to a JsonWriter in a specific format.

    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

    • IIPBanEntryAdapter

      public IIPBanEntryAdapter()
  • Method Details

    • write

      public void write (@NotNull @NotNull com.google.gson.stream.JsonWriter writer, @NotNull @NotNull IIPBanEntry entry) throws IOException
      Writes an IIPBanEntry object to a JsonWriter in a specific format.
      Specified by:
      write in class com.google.gson.TypeAdapter<IIPBanEntry>
      Parameters:
      writer - The JsonWriter object to write the IIPBanEntry object to.
      entry - The IIPBanEntry object to be written.
      Throws:
      IOException - If there is an error during the writing process.
    • read

      public IIPBanEntry read (@NotNull @NotNull com.google.gson.stream.JsonReader reader) throws IOException
      Reads a JSON object from a JsonReader and returns an instance of IIPBanEntry.
      Specified by:
      read in class com.google.gson.TypeAdapter<IIPBanEntry>
      Parameters:
      reader - The JsonReader from which to read the JSON object.
      Returns:
      An instance of IIPBanEntry populated with the values read from the JSON object.
      Throws:
      IOException - If an I/O error occurs while reading from the JsonReader.