Class InterfaceSerializer<T>

  • All Implemented Interfaces:
    com.google.gson.JsonSerializer<T>

    public class InterfaceSerializer<T>
    extends java.lang.Object
    implements com.google.gson.JsonSerializer<T>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String PROPERTY_DATA  
      static java.lang.String PROPERTY_TYPE  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getClassName​(T src, java.lang.reflect.Type typeOfSrc)  
      com.google.gson.JsonElement serialize​(T 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

      • InterfaceSerializer

        public InterfaceSerializer()
    • Method Detail

      • serialize

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

        public java.lang.String getClassName​(T src,
                                             java.lang.reflect.Type typeOfSrc)