예제 #1
0
 public static TypeAdapterFactory b(TypeToken typetoken, Object obj)
 {
     boolean flag;
     if (typetoken.getType() == typetoken.getRawType())
     {
         flag = true;
     } else
     {
         flag = false;
     }
     return new a(obj, typetoken, flag, null, (byte)0);
 }
예제 #2
0
 public final TypeAdapter create(Gson gson, TypeToken typetoken)
 {
     boolean flag;
     if (a != null)
     {
         if (a.equals(typetoken) || b && a.getType() == typetoken.getRawType())
         {
             flag = true;
         } else
         {
             flag = false;
         }
     } else
     {
         flag = c.isAssignableFrom(typetoken.getRawType());
     }
     if (flag)
     {
         return new n(d, e, gson, typetoken, this, (byte)0);
     } else
     {
         return null;
     }
 }
예제 #3
0
 public final Object read(JsonReader jsonreader)
 {
     if (b == null)
     {
         return a().read(jsonreader);
     }
     jsonreader = Streams.parse(jsonreader);
     if (jsonreader.isJsonNull())
     {
         return null;
     } else
     {
         return b.deserialize(jsonreader, d.getType(), c.deserializationContext);
     }
 }
예제 #4
0
 public final void write(JsonWriter jsonwriter, Object obj)
 {
     if (a == null)
     {
         a().write(jsonwriter, obj);
         return;
     }
     if (obj == null)
     {
         jsonwriter.nullValue();
         return;
     } else
     {
         Streams.write(a.serialize(obj, d.getType(), c.serializationContext), jsonwriter);
         return;
     }
 }