类 GeneralObjectAdapter<T>


  • public class GeneralObjectAdapter<T>
    extends com.google.gson.TypeAdapter<T>
    • 构造器概要

      构造器 
      构造器 说明
      GeneralObjectAdapter​(com.google.gson.FieldNamingPolicy policy, com.google.gson.reflect.TypeToken<T> typeToken)  
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      T read​(com.google.gson.stream.JsonReader reader)  
      void write​(com.google.gson.stream.JsonWriter writer, T object)  
      • 从类继承的方法 com.google.gson.TypeAdapter

        fromJson, fromJson, fromJsonTree, nullSafe, toJson, toJson, toJsonTree
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 构造器详细资料

      • GeneralObjectAdapter

        public GeneralObjectAdapter​(com.google.gson.FieldNamingPolicy policy,
                                    com.google.gson.reflect.TypeToken<T> typeToken)
    • 方法详细资料

      • write

        public void write​(com.google.gson.stream.JsonWriter writer,
                          T object)
                   throws java.io.IOException
        指定者:
        write 在类中 com.google.gson.TypeAdapter<T>
        抛出:
        java.io.IOException
      • read

        public T read​(com.google.gson.stream.JsonReader reader)
               throws java.io.IOException
        指定者:
        read 在类中 com.google.gson.TypeAdapter<T>
        抛出:
        java.io.IOException