@Test public void testUnknownMapper() { assertThrows(ConfigMappingException.class, () -> managerNoServices.map(mock(Config.class), CustomClass.class)); assertThrows(ConfigMappingException.class, () -> managerWithServices.map(mock(Config.class), CustomClass.class)); }
@Override public <T> T map(Config config, Class<T> type) throws MissingValueException, ConfigMappingException { if (type.isArray()) { return mapArray(config, type); } return map(config, GenericType.create(supportedType(type))); }
ConfigMapperManager implements ConfigMapper { @Override public <T> T map(Config config, Class<T> type) throws MissingValueException, ConfigMappingException { if (type.isArray()) { return mapArray(config, type); } return map(config, GenericType.create(supportedType(type))); } }
ConfigMapperManager implements ConfigMapper { @Override public <T> T map(Config config, Class<T> type) throws MissingValueException, ConfigMappingException { if (type.isArray()) { return mapArray(config, type); } return map(config, GenericType.create(supportedType(type))); } ConfigMapperManager(MapperProviders mapperProviders); }
ConfigMapperManager implements ConfigMapper { @Override public <T> T map(Config config, Class<T> type) throws MissingValueException, ConfigMappingException { if (type.isArray()) { return mapArray(config, type); } return map(config, GenericType.create(supportedType(type))); } 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 { @Override public <T> T map(Config config, Class<T> type) throws MissingValueException, ConfigMappingException { if (type.isArray()) { return mapArray(config, type); } return map(config, GenericType.create(supportedType(type))); } 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);  }