Class GeneralInterfaceAdapter<INTERFACE extends GsonSerializable>

  • All Implemented Interfaces:
    com.google.gson.JsonDeserializer<INTERFACE>, com.google.gson.JsonSerializer<INTERFACE>

    public class GeneralInterfaceAdapter<INTERFACE extends GsonSerializable>
    extends java.lang.Object
    implements com.google.gson.JsonSerializer<INTERFACE>, com.google.gson.JsonDeserializer<INTERFACE>
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      INTERFACE deserialize​(com.google.gson.JsonElement json, java.lang.reflect.Type typeOfT, com.google.gson.JsonDeserializationContext context)  
      java.lang.Class<INTERFACE> getClassInstance​(java.lang.String className)  
      com.google.gson.JsonElement serialize​(INTERFACE src, java.lang.reflect.Type typeOfSrc, com.google.gson.JsonSerializationContext context)  
      • Methods inherited from class java.lang.Object

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

      • GeneralInterfaceAdapter

        public GeneralInterfaceAdapter()
    • Method Detail

      • deserialize

        public INTERFACE deserialize​(com.google.gson.JsonElement json,
                                     java.lang.reflect.Type typeOfT,
                                     com.google.gson.JsonDeserializationContext context)
                              throws com.google.gson.JsonParseException
        Specified by:
        deserialize in interface com.google.gson.JsonDeserializer<INTERFACE extends GsonSerializable>
        Throws:
        com.google.gson.JsonParseException
      • serialize

        public com.google.gson.JsonElement serialize​(INTERFACE src,
                                                     java.lang.reflect.Type typeOfSrc,
                                                     com.google.gson.JsonSerializationContext context)
        Specified by:
        serialize in interface com.google.gson.JsonSerializer<INTERFACE extends GsonSerializable>
      • getClassInstance

        public java.lang.Class<INTERFACE> getClassInstance​(java.lang.String className)