Class GuiComponentDeserializer<C extends GuiComponent,B extends GuiComponentBuilder>

java.lang.Object
com.fasterxml.jackson.databind.JsonDeserializer<C>
io.github.toberocat.guiengine.xml.GuiComponentDeserializer<C,B>
Type Parameters:
C - The type of GuiComponent to be deserialized.
B - The type of GuiComponentBuilder associated with the component to be deserialized.

Created: 10.07.2023 Author: Tobias Madlberger (Tobias)

All Implemented Interfaces:
com.fasterxml.jackson.databind.deser.NullValueProvider

public class GuiComponentDeserializer<C extends GuiComponent,B extends GuiComponentBuilder> extends com.fasterxml.jackson.databind.JsonDeserializer<C>
Custom JSON deserializer for a specific type of GuiComponent. This class is responsible for deserializing JSON data into a GuiComponent object using its builder.
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonDeserializer

    com.fasterxml.jackson.databind.JsonDeserializer.None
  • Constructor Summary

    Constructors
    Constructor
    Description
    GuiComponentDeserializer(@NotNull Class<B> builderClazz)
    Constructor for the GuiComponentDeserializer.
  • Method Summary

    Modifier and Type
    Method
    Description
    deserialize(@NotNull com.fasterxml.jackson.core.JsonParser p, com.fasterxml.jackson.databind.DeserializationContext deserializationContext)
    Deserialize JSON data into a GuiComponent object using its builder.

    Methods inherited from class com.fasterxml.jackson.databind.JsonDeserializer

    deserialize, deserializeWithType, deserializeWithType, findBackReference, getAbsentValue, getDelegatee, getEmptyAccessPattern, getEmptyValue, getEmptyValue, getKnownPropertyNames, getNullAccessPattern, getNullValue, getNullValue, getObjectIdReader, handledType, isCachable, logicalType, replaceDelegatee, supportsUpdate, unwrappingDeserializer

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GuiComponentDeserializer

      public GuiComponentDeserializer(@NotNull @NotNull Class<B> builderClazz)
      Constructor for the GuiComponentDeserializer.
      Parameters:
      builderClazz - The class of the GuiComponentBuilder associated with the component to be deserialized.
  • Method Details

    • deserialize

      @NotNull public C deserialize(@NotNull @NotNull com.fasterxml.jackson.core.JsonParser p, com.fasterxml.jackson.databind.DeserializationContext deserializationContext) throws IOException
      Deserialize JSON data into a GuiComponent object using its builder.
      Specified by:
      deserialize in class com.fasterxml.jackson.databind.JsonDeserializer<C extends GuiComponent>
      Parameters:
      p - The JsonParser to read the JSON data from.
      deserializationContext - The DeserializationContext to use during deserialization.
      Returns:
      A GuiComponent object created from the JSON data using its builder.
      Throws:
      IOException - If an I/O error occurs during JSON parsing.