Android Open Source - spotastop Gson Configurator






From Project

Back to project page spotastop.

License

The source code is released under:

MIT License

If you think the Android project spotastop listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.nicfix.gsoncompatibility;
// ww w . j  ava 2 s  .  c om
import resources.Resource;
import responses.beContentResponse;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

public class GsonConfigurator {

  private GsonBuilder gsonBuilder;

  private static GsonConfigurator instance;

  public static GsonConfigurator getInstance() {
    if (instance == null) {
      instance = new GsonConfigurator();
    }
    return instance;
  }

  private GsonConfigurator() {
    gsonBuilder=new GsonBuilder();
    gsonBuilder.registerTypeAdapter(beContentResponse.class,
        new beContentResponse());
  }

  public Gson build() {
    return gsonBuilder.create();
  }

  public void registerDeserializer(Resource resource, Class T) {
    gsonBuilder.registerTypeAdapter(T, resource);
  }

}




Java Source Code List

.LoaderTester.java
com.cipciop.spotastop.ErrorActivity.java
com.cipciop.spotastop.LoginActivity.java
com.cipciop.spotastop.RegisterActivity.java
com.cipciop.spotastop.SelectBusLine.java
com.cipciop.spotastop.SpotActivity.java
com.cipciop.spotastop.StopSpotApp.java
com.cipciop.spotastop.domain.BusStop.java
com.cipciop.spotastop.domain.GeoPos.java
com.cipciop.spotastop.domain.Line.java
com.cipciop.spotastop.domain.User.java
com.cipciop.spotastop.presentation.BusLineItem.java
com.cipciop.spotastop.services.JarvisDynDnsService.java
com.cipciop.spotastop.services.LoginService.java
com.cipciop.spotastop.services.RegistrationService.java
com.cipciop.spotastop.services.RetrieveLinesListService.java
com.cipciop.spotastop.services.SpotBusStopService.java
com.nicfix.gsoncompatibility.GsonConfigurator.java
requests.CreatorRequest.java
requests.Criteria.java
requests.Data.java
requests.EditorRequest.java
requests.Link.java
requests.LinkerRequest.java
requests.LoaderRequest.java
requests.StorerRequest.java
requests.Unlink.java
requests.beContentRequest.java
resources.Resource.java
resources.ResourcesCache.java
resources.ResourcesMapper.java
responses.AsyncCallback.java
responses.beContentResponse.java
rest.RestApi.java
settings.Settings.java