Class IPBanEntry.IIPBanEntryAdapter
java.lang.Object
com.google.gson.TypeAdapter<IIPBanEntry>
me.github.simonplays15.betterbansystem.core.ban.IPBanEntry.IIPBanEntryAdapter
- Enclosing class:
- IPBanEntry
The IIPBanEntryAdapter class is a Gson TypeAdapter for serializing and deserializing
IIPBanEntry objects.
- Since:
- 1.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionread
(@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
-
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 classcom.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 classcom.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.
-