Example usage for com.google.gson GsonBuilder create

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

Introduction

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

Prototype

public Gson create() 

Source Link

Document

Creates a Gson instance based on the current configuration.

Usage

From source file:com.ccc.crest.core.cache.crest.tournament.TournamentPilotStatusCollection.java

License:Open Source License

public static Future<EveData> getFuture(CrestResponseCallback callback) throws Exception {
    GsonBuilder gson = new GsonBuilder();
    gson.registerTypeAdapter(TournamentPilotStatusCollection.class, new TournamentPilotStatusCollection());

    //@formatter:off
    CrestRequestData rdata = new CrestRequestData(null, getUrl(), gson.create(), null,
            TournamentPilotStatusCollection.class, callback, ReadScope, getVersion(VersionType.Get),
            continueRefresh, false);/*  w  w  w .  j av  a  2  s.  c o m*/
    //@formatter:on
    return CrestController.getCrestController().crestClient.getCrest(rdata);
}

From source file:com.ccc.crest.core.cache.crest.tournament.TournamentSeries.java

License:Open Source License

public static Future<EveData> getFuture(long tournamentId, CrestResponseCallback callback) throws Exception {
    String url = getUrl();/*  ww  w  .  j  ava  2 s .  co  m*/
    url += tournamentId + "/series/";
    GsonBuilder gson = new GsonBuilder();
    gson.registerTypeAdapter(TournamentSeries.class, new TournamentSeries());
    //@formatter:off
    CrestRequestData rdata = new CrestRequestData(null, url, gson.create(), null, TournamentSeries.class,
            callback, ReadScope, getVersion(VersionType.Get), continueRefresh, false);
    //@formatter:on
    return CrestController.getCrestController().crestClient.getCrest(rdata);
}

From source file:com.ccc.crest.core.cache.crest.tournament.TournamentSeriesCollection.java

License:Open Source License

public static Future<EveData> getFuture(long tournamentId, CrestResponseCallback callback) throws Exception {
    String url = getUrl();// w w w  . j a v  a2s  . c o  m
    url += tournamentId + "/series/";
    GsonBuilder gson = new GsonBuilder();
    gson.registerTypeAdapter(TournamentSeriesCollection.class, new TournamentSeriesCollection());
    //@formatter:off
    CrestRequestData rdata = new CrestRequestData(null, url, gson.create(), null,
            TournamentSeriesCollection.class, callback, ReadScope, getVersion(VersionType.Get), continueRefresh,
            false);
    //@formatter:on
    return CrestController.getCrestController().crestClient.getCrest(rdata);
}

From source file:com.ccc.crest.core.cache.crest.tournament.TournamentStatic.java

License:Open Source License

public static Future<EveData> getFuture(long id, CrestResponseCallback callback) throws Exception {
    GsonBuilder gson = new GsonBuilder();
    gson.registerTypeAdapter(TournamentStatic.class, new TournamentStatic());

    //@formatter:off
    CrestRequestData rdata = new CrestRequestData(null, getUrl(), gson.create(), null, TournamentStatic.class,
            callback, ReadScope, getVersion(VersionType.Get), continueRefresh, false);
    //@formatter:on
    return CrestController.getCrestController().crestClient.getCrest(rdata);
}

From source file:com.ccc.crest.core.cache.crest.tournament.TournamentTeam.java

License:Open Source License

public static Future<EveData> getFuture(CrestResponseCallback callback) throws Exception {
    GsonBuilder gson = new GsonBuilder();
    gson.registerTypeAdapter(TournamentTeam.class, new TournamentTeam());

    //@formatter:off
    CrestRequestData rdata = new CrestRequestData(null, getUrl(), gson.create(), null, TournamentTeam.class,
            callback, ReadScope, getVersion(VersionType.Get), continueRefresh, false);
    //@formatter:on
    return CrestController.getCrestController().crestClient.getCrest(rdata);
}

From source file:com.ccc.crest.core.cache.crest.tournament.TournamentTeam2.java

License:Open Source License

public static Future<EveData> getFuture(CrestResponseCallback callback) throws Exception {
    GsonBuilder gson = new GsonBuilder();
    gson.registerTypeAdapter(TournamentTeam2.class, new TournamentTeam2());

    //@formatter:off
    CrestRequestData rdata = new CrestRequestData(null, getUrl(), gson.create(), null, TournamentTeam2.class,
            callback, ReadScope, getVersion(VersionType.Get), continueRefresh, false);
    //@formatter:on
    return CrestController.getCrestController().crestClient.getCrest(rdata);
}

From source file:com.ccc.crest.core.cache.crest.tournament.TournamentTeamCollection.java

License:Open Source License

public static Future<EveData> getFuture(CrestResponseCallback callback) throws Exception {
    GsonBuilder gson = new GsonBuilder();
    gson.registerTypeAdapter(TournamentTeamCollection.class, new TournamentTeamCollection());

    //@formatter:off
    CrestRequestData rdata = new CrestRequestData(null, getUrl(), gson.create(), null,
            TournamentTeamCollection.class, callback, ReadScope, getVersion(VersionType.Get), continueRefresh,
            false);//from   w  w  w .  j  a va2  s .c o  m
    //@formatter:on
    return CrestController.getCrestController().crestClient.getCrest(rdata);
}

From source file:com.ccc.crest.core.cache.crest.tournament.TournamentTeamMemberCollection.java

License:Open Source License

public static Future<EveData> getFuture(CrestResponseCallback callback) throws Exception {
    GsonBuilder gson = new GsonBuilder();
    gson.registerTypeAdapter(TournamentTeamMemberCollection.class, new TournamentTeamMemberCollection());

    //@formatter:off
    CrestRequestData rdata = new CrestRequestData(null, getUrl(), gson.create(), null,
            TournamentTeamMemberCollection.class, callback, ReadScope, getVersion(VersionType.Get),
            continueRefresh, false);/* w ww .  j av  a2s . co  m*/
    //@formatter:on
    return CrestController.getCrestController().crestClient.getCrest(rdata);
}

From source file:com.ccc.crest.core.cache.crest.tournament.TournamentTournament.java

License:Open Source License

public static Future<EveData> getFuture(long id, CrestResponseCallback callback) throws Exception {
    GsonBuilder gson = new GsonBuilder();
    gson.registerTypeAdapter(TournamentTournament.class, new TournamentTournament());

    //@formatter:off
    CrestRequestData rdata = new CrestRequestData(null, getUrl(), gson.create(), null,
            TournamentTournament.class, callback, ReadScope, getVersion(VersionType.Get), continueRefresh,
            false);//from   www  .j a va2s  . c o  m
    //@formatter:on
    return CrestController.getCrestController().crestClient.getCrest(rdata);
}

From source file:com.ccc.crest.core.cache.crest.virtualGoodStore.VirtualGoodStore.java

License:Open Source License

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