Source:
public static Geocoder provideGeocoder(Config config) { if (config.getBoolean(Keys.GEOCODER_ENABLE)) { String type = config.getString(Keys.GEOCODER_TYPE, "google"); String url = config.getString(Keys.GEOCODER_URL); String id = config.getString(Keys.GEOCODER_ID); String key = config.getString(Keys.GEOCODER_KEY); String language = config.getString(Keys.GEOCODER_LANGUAGE); String formatString = config.getString(Keys.GEOCODER_FORMAT); AddressFormat addressFormat = formatString != null ? new AddressFormat(formatString) : new AddressFormat(); int cacheSize = config.getInteger(Keys.GEOCODER_CACHE_SIZE); switch (type) { case "nominatim": return new NominatimGeocoder(url, key, language, cacheSize, addressFormat); case "gisgraphy": return new GisgraphyGeocoder(url, cacheSize, addressFormat); case "mapquest": return new MapQuestGeocoder(url, key, cacheSize, addressFormat); case "opencage": return new OpenCageGeocoder(url, key, cacheSize, addressFormat); case "bingmaps": return new BingMapsGeocoder(url, key, cacheSize, addressFormat); case "factual": return new FactualGeocoder(url, key, cacheSize, addressFormat); case "geocodefarm": return new GeocodeFarmGeocoder(key, language, cacheSize, addressFormat); case "geocodexyz": return new GeocodeXyzGeocoder(key, cacheSize, addressFormat); case "ban": return new BanGeocoder(cacheSize, addressFormat); case "here": return new HereGeocoder(id, key, language, cacheSize, addressFormat); case "mapmyindia": return new MapmyIndiaGeocoder(url, key, cacheSize, addressFormat); case "geoPortail": return new GeoPortailGeocoder(url,cacheSize,addressFormat); default: return new GoogleGeocoder(key, language, cacheSize, addressFormat); } } return null; }

Target:
public static Geocoder provideGeocoder(Config config) { if (config.getBoolean(Keys.GEOCODER_ENABLE)) { String type = config.getString(Keys.GEOCODER_TYPE, "google"); String url = config.getString(Keys.GEOCODER_URL); String id = config.getString(Keys.GEOCODER_ID); String key = config.getString(Keys.GEOCODER_KEY); String language = config.getString(Keys.GEOCODER_LANGUAGE); String formatString = config.getString(Keys.GEOCODER_FORMAT); AddressFormat addressFormat = formatString != null ? new AddressFormat(formatString) : new AddressFormat(); int cacheSize = config.getInteger(Keys.GEOCODER_CACHE_SIZE); switch (type) { case "nominatim": return new NominatimGeocoder(url, key, language, cacheSize, addressFormat); case "gisgraphy": return new GisgraphyGeocoder(url, cacheSize, addressFormat); case "mapquest": return new MapQuestGeocoder(url, key, cacheSize, addressFormat); case "opencage": return new OpenCageGeocoder(url, key, cacheSize, addressFormat); case "bingmaps": return new BingMapsGeocoder(url, key, cacheSize, addressFormat); case "factual": return new FactualGeocoder(url, key, cacheSize, addressFormat); case "geocodefarm": return new GeocodeFarmGeocoder(key, language, cacheSize, addressFormat); case "geocodexyz": return new GeocodeXyzGeocoder(key, cacheSize, addressFormat); case "ban": return new BanGeocoder(cacheSize, addressFormat); case "here": return new HereGeocoder(id, key, language, cacheSize, addressFormat); case "mapmyindia": return new MapmyIndiaGeocoder(url, key, cacheSize, addressFormat); case "geoportail": return new GeoPortailGeocoder(url, cacheSize, addressFormat); default: return new GoogleGeocoder(key, language, cacheSize, addressFormat); } } return null; }