Class EnumTypeAdapter<T extends Enum<T>>

java.lang.Object
com.google.gson.TypeAdapter<T>
org.javacs.lsp.adapters.EnumTypeAdapter<T>

public class EnumTypeAdapter<T extends Enum<T>> extends com.google.gson.TypeAdapter<T>
A custom type adapter for enums that uses integer values. Copied from lsp4j.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Method Summary

    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

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

    Methods inherited from class java.lang.Object

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

    • read

      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

      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