@Override public Object findInjectableValue(final Object valueId, final DeserializationContext ctxt, final BeanProperty forProperty, final Object beanInstance) throws JsonMappingException { if ("ip_address".equals(valueId)) { return ip; } else if ("traits".equals(valueId)) { return new Traits(ip); } else if ("locales".equals(valueId)) { return locales; } return null; } }
@Override public String getValue(CityResponse response) { return response.getTraits().getIpAddress(); } },
@Override public Object findInjectableValue(Object valueId, DeserializationContext ctxt, BeanProperty forProperty, Object beanInstance) { if ("locales".equals(valueId)) { return locales; } if ("ip_address".equals(valueId)) { return ip; } if ("traits".equals(valueId)) { return new Traits(ip); } return null; } }
@Override public Object findInjectableValue(Object valueId, DeserializationContext ctxt, BeanProperty forProperty, Object beanInstance) { if ("locales".equals(valueId)) { return locales; } if ("ip_address".equals(valueId)) { return ip; } if ("traits".equals(valueId)) { return new Traits(ip); } return null; } }
AbstractCountryResponse( Continent continent, Country country, MaxMind maxmind, Country registeredCountry, RepresentedCountry representedCountry, Traits traits ) { this.continent = continent != null ? continent : new Continent(); this.country = country != null ? country : new Country(); this.registeredCountry = registeredCountry != null ? registeredCountry : new Country(); this.maxmind = maxmind != null ? maxmind : new MaxMind(); this.representedCountry = representedCountry != null ? representedCountry : new RepresentedCountry(); this.traits = traits != null ? traits : new Traits(); }
AbstractCountryResponse( Continent continent, Country country, MaxMind maxmind, Country registeredCountry, RepresentedCountry representedCountry, Traits traits ) { this.continent = continent != null ? continent : new Continent(); this.country = country != null ? country : new Country(); this.registeredCountry = registeredCountry != null ? registeredCountry : new Country(); this.maxmind = maxmind != null ? maxmind : new MaxMind(); this.representedCountry = representedCountry != null ? representedCountry : new RepresentedCountry(); this.traits = traits != null ? traits : new Traits(); }