Class CFSchemaEnumTypeAdapter<E extends Enum<E>>

java.lang.Object
com.google.gson.TypeAdapter<E>
io.github.matyrobbrt.curseforgeapi.util.gson.CFSchemaEnumTypeAdapter<E>

public class CFSchemaEnumTypeAdapter<E extends Enum<E>> extends com.google.gson.TypeAdapter<E>
  • Constructor Details

    • CFSchemaEnumTypeAdapter

      public CFSchemaEnumTypeAdapter(Class<E> clazz)
  • Method Details

    • constructUnsafe

      public static <E extends Enum<E>> CFSchemaEnumTypeAdapter<E> constructUnsafe(Class<?> clazz)
    • write

      public void write(com.google.gson.stream.JsonWriter out, E value) throws IOException
      Specified by:
      write in class com.google.gson.TypeAdapter<E extends Enum<E>>
      Throws:
      IOException
    • read

      public E read(com.google.gson.stream.JsonReader in) throws IOException
      Specified by:
      read in class com.google.gson.TypeAdapter<E extends Enum<E>>
      Throws:
      IOException