@Test public void test8_LackingGetter() { assertThat(converter.convert(new LackingGetterForm8("aaa", "bbb")), is( Collections.singletonMap("value1", "aaa"))); }
private Map<String, String> convert(String prefix, Map<?, ?> value) { Map<String, String> map = new LinkedHashMap<String, String>(); for (Map.Entry<?, ?> e : value.entrySet()) { if (StringUtils.isEmpty(prefix)) { map.putAll(this.convert(e.getKey().toString(), e.getValue())); } else { map.putAll(this.convert(prefix + "[" + e.getKey() + "]", e .getValue())); } } return map; }
ObjectToMapConverter { private Map<String, String> convert(String prefix, Map<?, ?> value) { Map<String, String> map = new LinkedHashMap<String, String>(); for (Map.Entry<?, ?> e : value.entrySet()) { if (StringUtils.isEmpty(prefix)) { map.putAll(this.convert(e.getKey().toString(), e.getValue())); } else { map.putAll(this.convert(prefix + "[" + e.getKey() + "]", e .getValue())); } } return map; } }
ObjectToMapConverter { private Map<String, String> convert(String prefix, Map<?, ?> value) { Map<String, String> map = new LinkedHashMap<String, String>(); for (Map.Entry<?, ?> e : value.entrySet()) { if (StringUtils.isEmpty(prefix)) { map.putAll(this.convert(e.getKey().toString(), e.getValue())); } else { map.putAll(this.convert(prefix + "[" + e.getKey() + "]", e .getValue())); } } return map; } ObjectToMapConverter(FormattingConversionService conversionService); }
ObjectToMapConverter { private Map<String, String> convert(String prefix, Map<?, ?> value) { Map<String, String> map = new LinkedHashMap<String, String>(); for (Map.Entry<?, ?> e : value.entrySet()) { if (StringUtils.isEmpty(prefix)) { map.putAll(this.convert(e.getKey().toString(), e.getValue())); } else { map.putAll(this.convert(prefix + "[" + e.getKey() + "]", e .getValue())); } } return map; } ObjectToMapConverter(FormattingConversionService conversionService); Map<String, String> convert(Object object); Map<String, String> convert(String prefix, Object object); }
ObjectToMapConverter { private Map<String, String> convert(String prefix, Map<?, ?> value) { Map<String, String> map = new LinkedHashMap<String, String>(); for (Map.Entry<?, ?> e : value.entrySet()) { if (StringUtils.isEmpty(prefix)) { map.putAll(this.convert(e.getKey().toString(), e.getValue())); } else { map.putAll(this.convert(prefix + "[" + e.getKey() + "]", e .getValue())); } } return map; } ObjectToMapConverter(FormattingConversionService conversionService); Map<String, String> convert(Object object); Map<String, String> convert(String prefix, Object object);  }