Class CollectionTypeAdapterFactory.Adapter<E>

  • Type Parameters:
    E - The type of elements in the collection
    Enclosing class:
    CollectionTypeAdapterFactory

    private static final class CollectionTypeAdapterFactory.Adapter<E>
    extends com.google.gson.TypeAdapter<java.util.Collection<E>>
    Adapter for the Collections.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private com.google.gson.internal.ObjectConstructor<? extends java.util.Collection<E>> constructor  
      private com.google.gson.TypeAdapter<E> elementTypeAdapter  
    • Constructor Summary

      Constructors 
      Constructor Description
      Adapter​(com.google.gson.TypeAdapter<E> elementAdapter, com.google.gson.internal.ObjectConstructor<? extends java.util.Collection<E>> constructor)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Collection<E> read​(com.google.gson.stream.JsonReader in)  
      void write​(com.google.gson.stream.JsonWriter out, java.util.Collection<E> collection)  
      • 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
    • Field Detail

      • elementTypeAdapter

        private final com.google.gson.TypeAdapter<E> elementTypeAdapter
      • constructor

        private final com.google.gson.internal.ObjectConstructor<? extends java.util.Collection<E>> constructor
    • Constructor Detail

      • Adapter

        public Adapter​(com.google.gson.TypeAdapter<E> elementAdapter,
                       com.google.gson.internal.ObjectConstructor<? extends java.util.Collection<E>> constructor)
    • Method Detail

      • read

        public java.util.Collection<E> read​(com.google.gson.stream.JsonReader in)
                                     throws java.io.IOException
        Specified by:
        read in class com.google.gson.TypeAdapter<java.util.Collection<E>>
        Throws:
        java.io.IOException
      • write

        public void write​(com.google.gson.stream.JsonWriter out,
                          java.util.Collection<E> collection)
                   throws java.io.IOException
        Specified by:
        write in class com.google.gson.TypeAdapter<java.util.Collection<E>>
        Throws:
        java.io.IOException