Package ch.njol.util

Class EnumTypeAdapter<T extends Enum<T>>

java.lang.Object
com.google.gson.TypeAdapter<T>
ch.njol.util.EnumTypeAdapter<T>

public final class EnumTypeAdapter<T extends Enum<T>> extends com.google.gson.TypeAdapter<T>
  • Field Summary Link icon

    Fields
    Modifier and Type
    Field
    Description
    static final com.google.gson.TypeAdapterFactory
     
  • Constructor Summary Link icon

    Constructors
    Constructor
    Description
    EnumTypeAdapter(Class<T> classOfT)
     
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    read(com.google.gson.stream.JsonReader in)
     
    void
    write(com.google.gson.stream.JsonWriter out, T value)
     

    Methods inherited from class com.google.gson.TypeAdapter Link icon

    fromJson, fromJson, fromJsonTree, nullSafe, toJson, toJson, toJsonTree

    Methods inherited from class java.lang.Object Link icon

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details Link icon

    • factory Link icon

      public static final com.google.gson.TypeAdapterFactory factory
  • Constructor Details Link icon

    • EnumTypeAdapter Link icon

      public EnumTypeAdapter(Class<T> classOfT)
  • Method Details Link icon

    • read Link icon

      public T read(com.google.gson.stream.JsonReader in) throws IOException
      Specified by:
      read in class com.google.gson.TypeAdapter<T extends Enum<T>>
      Throws:
      IOException
    • write Link icon

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