Example usage for com.google.gson GsonBuilder registerTypeAdapter

List of usage examples for com.google.gson GsonBuilder registerTypeAdapter

Introduction

In this page you can find the example usage for com.google.gson GsonBuilder registerTypeAdapter.

Prototype

@SuppressWarnings({ "unchecked", "rawtypes" })
public GsonBuilder registerTypeAdapter(Type type, Object typeAdapter) 

Source Link

Document

Configures Gson for custom serialization or deserialization.

Usage

From source file:com.ccc.crest.core.cache.crest.incursion.IncursionCollection.java

License:Open Source License

public static Future<EveData> getFuture(CrestResponseCallback callback) throws Exception {
    GsonBuilder gson = new GsonBuilder();
    gson.registerTypeAdapter(IncursionCollection.class, new IncursionCollection());
    //@formatter:off
    CrestRequestData rdata = new CrestRequestData(null, getUrl(), gson.create(), null,
            IncursionCollection.class, callback, ReadScope, getVersion(VersionType.Get), continueRefresh);
    //@formatter:on
    return CrestController.getCrestController().crestClient.getCrest(rdata);
}

From source file:com.ccc.crest.core.cache.crest.industry.IndustryFacilityCollection.java

License:Open Source License

public static Future<EveData> getFuture(CrestResponseCallback callback) throws Exception {
    GsonBuilder gson = new GsonBuilder();
    gson.registerTypeAdapter(IndustryFacilityCollection.class, new IndustryFacilityCollection());
    //@formatter:off
    CrestRequestData rdata = new CrestRequestData(null, getUrl(), gson.create(), null,
            IndustryFacilityCollection.class, callback, ReadScope, getVersion(VersionType.Get),
            continueRefresh);//from  ww w  .ja  va  2s  .  c om
    //@formatter:on
    return CrestController.getCrestController().crestClient.getCrest(rdata);
}

From source file:com.ccc.crest.core.cache.crest.industry.IndustrySystemCollection.java

License:Open Source License

public static Future<EveData> getFuture(CrestResponseCallback callback) throws Exception {
    GsonBuilder gson = new GsonBuilder();
    gson.registerTypeAdapter(IndustrySystemCollection.class, new IndustrySystemCollection());
    //@formatter:off
    CrestRequestData rdata = new CrestRequestData(null, getUrl(), gson.create(), null,
            IndustrySystemCollection.class, callback, ReadScope, getVersion(VersionType.Get), continueRefresh);
    //@formatter:on
    return CrestController.getCrestController().crestClient.getCrest(rdata);
}

From source file:com.ccc.crest.core.cache.crest.insurancePrice.InsurancePricesCollection.java

License:Open Source License

public static Future<EveData> getFuture(CrestResponseCallback callback) throws Exception {
    GsonBuilder gson = new GsonBuilder();
    gson.registerTypeAdapter(InsurancePricesCollection.class, new InsurancePricesCollection());
    //@formatter:off
    CrestRequestData rdata = new CrestRequestData(null, getUrl(), gson.create(), null,
            InsurancePricesCollection.class, callback, ReadScope, getVersion(VersionType.Get), continueRefresh);
    //@formatter:on
    return CrestController.getCrestController().crestClient.getCrest(rdata);
}

From source file:com.ccc.crest.core.cache.crest.inventory.ItemCategoryCollection.java

License:Open Source License

public static Future<EveData> getFuture(CrestResponseCallback callback) throws Exception {
    GsonBuilder gson = new GsonBuilder();
    gson.registerTypeAdapter(ItemCategoryCollection.class, new ItemCategoryCollection());
    //@formatter:off
    CrestRequestData rdata = new CrestRequestData(null, getUrl(), gson.create(), null,
            ItemCategoryCollection.class, callback, ReadScope, getVersion(VersionType.Get), continueRefresh);
    //@formatter:on
    return CrestController.getCrestController().crestClient.getCrest(rdata);
}

From source file:com.ccc.crest.core.cache.crest.inventory.ItemGroupCollection.java

License:Open Source License

public static Future<EveData> getFuture(CrestResponseCallback callback) throws Exception {
    GsonBuilder gson = new GsonBuilder();
    gson.registerTypeAdapter(ItemGroupCollection.class, new ItemGroupCollection());
    //@formatter:off
    CrestRequestData rdata = new CrestRequestData(null, getUrl(), gson.create(), null,
            ItemGroupCollection.class, callback, ReadScope, getVersion(VersionType.Get), continueRefresh);
    //@formatter:on
    return CrestController.getCrestController().crestClient.getCrest(rdata);
}

From source file:com.ccc.crest.core.cache.crest.inventory.ItemTypeCollection.java

License:Open Source License

public static Future<EveData> getFuture(CrestResponseCallback callback) throws Exception {
    GsonBuilder gson = new GsonBuilder();
    gson.registerTypeAdapter(ItemTypeCollection.class, new ItemTypeCollection());
    //@formatter:off
    CrestRequestData rdata = new CrestRequestData(null, getUrl(), gson.create(), null, ItemTypeCollection.class,
            callback, ReadScope, getVersion(VersionType.Get), continueRefresh);
    //@formatter:on
    return CrestController.getCrestController().crestClient.getCrest(rdata);
}

From source file:com.ccc.crest.core.cache.crest.map.ConstellationCollection.java

License:Open Source License

public static Future<EveData> getFuture(CrestResponseCallback callback) throws Exception {
    GsonBuilder gson = new GsonBuilder();
    gson.registerTypeAdapter(ConstellationCollection.class, new ConstellationCollection());
    //@formatter:off
    CrestRequestData rdata = new CrestRequestData(null, getUrl(), gson.create(), null,
            ConstellationCollection.class, callback, ReadScope, getVersion(VersionType.Get), continueRefresh);
    //@formatter:on
    return CrestController.getCrestController().crestClient.getCrest(rdata);
}

From source file:com.ccc.crest.core.cache.crest.map.Planet.java

License:Open Source License

public static Future<EveData> getFuture(CrestResponseCallback callback) throws Exception {
    GsonBuilder gson = new GsonBuilder();
    gson.registerTypeAdapter(Planet.class, new Planet());
    //@formatter:off
    CrestRequestData rdata = new CrestRequestData(null, getUrl(), gson.create(), null, Planet.class, callback,
            ReadScope, getVersion(VersionType.Get), continueRefresh);
    //@formatter:on
    return CrestController.getCrestController().crestClient.getCrest(rdata);
}

From source file:com.ccc.crest.core.cache.crest.map.RegionCollection.java

License:Open Source License

public static Future<EveData> getFuture(CrestResponseCallback callback) throws Exception {
    GsonBuilder gson = new GsonBuilder();
    gson.registerTypeAdapter(RegionCollection.class, new RegionCollection());
    //@formatter:off
    CrestRequestData rdata = new CrestRequestData(null, getUrl(), gson.create(), null, RegionCollection.class,
            callback, ReadScope, getVersion(VersionType.Get), continueRefresh);
    //@formatter:on
    return CrestController.getCrestController().crestClient.getCrest(rdata);
}