@Test void testGenericTypeMapperMap() { MapperProviders providers = MapperProviders.create(); providers.add(new ParametrizedConfigMapper()); ConfigMapperManager configMapperManager = BuilderImpl.buildMappers(providers); Config config = configMapperManager.simpleConfig("test", "1"); ConfigValue<Map<String, Integer>> map = config.as(new GenericType<Map<String, Integer>>() { }); assertThat(map.get(), is(Map.of("test", 1))); }
Config simpleConfig(String name, String stringValue) { return new SingleValueConfigImpl(this, name, stringValue); }
ConfigMapperManager implements ConfigMapper { Config simpleConfig(String name, String stringValue) { return new SingleValueConfigImpl(this, name, stringValue); } }
ConfigMapperManager implements ConfigMapper { Config simpleConfig(String name, String stringValue) { return new SingleValueConfigImpl(this, name, stringValue); } ConfigMapperManager(MapperProviders mapperProviders); }
ConfigMapperManager implements ConfigMapper { Config simpleConfig(String name, String stringValue) { return new SingleValueConfigImpl(this, name, stringValue); } ConfigMapperManager(MapperProviders mapperProviders); @Override T map(Config config, Class<T> type); @Override T map(Config config, GenericType<T> type); @Override T map(String value, Class<T> type, String key); @Override T map(String value, GenericType<T> type, String key); @SuppressWarnings("unchecked") static Class<T> supportedType(Class<T> type); }
ConfigMapperManager implements ConfigMapper { Config simpleConfig(String name, String stringValue) { return new SingleValueConfigImpl(this, name, stringValue); } ConfigMapperManager(MapperProviders mapperProviders); @Override T map(Config config, Class<T> type); @Override T map(Config config, GenericType<T> type); @Override T map(String value, Class<T> type, String key); @Override T map(String value, GenericType<T> type, String key); @SuppressWarnings("unchecked") static Class<T> supportedType(Class<T> type);  }