List of usage examples for com.google.gson TypeAdapterFactory interface-usage
From source file BundleTypeAdapterFactory.java
/** * Type adapter for Android Bundle. It only stores the actual properties set in the bundle * * @author Inderjeet Singh */ public class BundleTypeAdapterFactory implements TypeAdapterFactory {
From source file RestrictSerializationToBaseClassFactory.java
/**
* Use this type adapter factory to restrict your JSON API. Extend the JSON API classes in server,
* and serialize them without serializing additional elements.
*
* @author Inderjeet Singh
*/
From source file app.data.foundation.GsonAdapterFactory.java
@GsonTypeAdapterFactory public abstract class GsonAdapterFactory implements TypeAdapterFactory { public static GsonAdapterFactory create() { return new AutoValueGson_GsonAdapterFactory(); }
From source file blog.ClassTypeAdapterFactory.java
public class ClassTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> typeToken) { if (!Class.class.isAssignableFrom(typeToken.getRawType())) { return null;
From source file ca.ualberta.cs.team1travelexpenseapp.gsonUtils.RuntimeTypeAdapterFactory.java
/**
* Adapts values whose runtime type may differ from their declaration type. This
* is necessary when a field's type is not the same type that GSON should create
* when deserializing that field. For example, consider these types:
* <pre> {@code
* abstract class Shape {
From source file cc.kave.commons.utils.json.RuntimeTypeAdapterFactory.java
/**
* Adapts values whose runtime type may differ from their declaration type. This
* is necessary when a field's type is not the same type that GSON should create
* when deserializing that field. For example, consider these types:
*
* <pre>
From source file ch.uzh.ifi.seal.soprafs15.group_00_android.models.gson.AutoValueAdapterFactory.java
public final class AutoValueAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) { Class<? super T> rawType = type.getRawType();
From source file ch.uzh.ifi.seal.soprafs15.group_09_android.models.gson.AutoValueAdapterFactory.java
public final class AutoValueAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) { Class<? super T> rawType = type.getRawType();
From source file ch.vorburger.worlds.persistence.gson.RuntimeTypeAdapterFactory.java
/**
* Adapts values whose runtime type may differ from their declaration type. This
* is necessary when a field's type is not the same type that GSON should create
* when deserializing that field. For example, consider these types:
* <pre> {@code
* abstract class Shape {
From source file cmput301w15t07.TravelTracker.util.DeletionFlagTypeAdapterFactory.java
/**
* @author Braedy
*
* References https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/TypeAdapterFactory.html
* heavily.
*