Class ConditionalTypeAdapter

java.lang.Object
com.google.gson.TypeAdapter<Conditional>
dev.foxikle.customnpcs.actions.conditions.ConditionalTypeAdapter

public class ConditionalTypeAdapter extends com.google.gson.TypeAdapter<Conditional>
The object allowing Gson to parse conditional objects
  • Constructor Details

    • ConditionalTypeAdapter

      public ConditionalTypeAdapter()
  • Method Details

    • write

      public void write(com.google.gson.stream.JsonWriter out, Conditional conditional) throws IOException
      Specified by:
      write in class com.google.gson.TypeAdapter<Conditional>
      Parameters:
      out - the data write out to
      conditional - the Java object to write. May be null.
      Throws:
      IOException - if an exception occours
    • read

      public Conditional read(com.google.gson.stream.JsonReader in) throws IOException
      Specified by:
      read in class com.google.gson.TypeAdapter<Conditional>
      Parameters:
      in - the data to parse
      Returns:
      the deserialized Conditional
      Throws:
      IOException - if an error occours reading