CoreConfigurationBuilder extends DefaultConfigurationBuilder { @SuppressWarnings("unchecked") @Override protected void addCorePropertyConverters() { addPropertyConverters(TypeLiteral.<BigDecimal>of(BigDecimal.class), new BigDecimalConverter()); addPropertyConverters(TypeLiteral.<BigInteger>of(BigInteger.class), new BigIntegerConverter()); addPropertyConverters(TypeLiteral.<Boolean>of(Boolean.class), new BooleanConverter()); addPropertyConverters(TypeLiteral.<Byte>of(Byte.class), new ByteConverter()); addPropertyConverters(TypeLiteral.<Character>of(Character.class), new CharConverter()); addPropertyConverters(TypeLiteral.<Class<?>>of(Class.class), new ClassConverter()); addPropertyConverters(TypeLiteral.<Currency>of(Currency.class), new CurrencyConverter()); addPropertyConverters(TypeLiteral.<Double>of(Double.class), new DoubleConverter()); addPropertyConverters(TypeLiteral.<File>of(File.class), new FileConverter()); addPropertyConverters(TypeLiteral.<Float>of(Float.class), new FloatConverter()); addPropertyConverters(TypeLiteral.<Integer>of(Integer.class), new IntegerConverter()); addPropertyConverters(TypeLiteral.<Long>of(Long.class), new LongConverter()); addPropertyConverters(TypeLiteral.<Number>of(Number.class), new NumberConverter()); addPropertyConverters(TypeLiteral.<Path>of(Path.class), new PathConverter()); addPropertyConverters(TypeLiteral.<Short>of(Short.class), new ShortConverter()); addPropertyConverters(TypeLiteral.<URI>of(URI.class), new URIConverter()); addPropertyConverters(TypeLiteral.<URL>of(URL.class), new URLConverter()); } CoreConfigurationBuilder();  CoreConfigurationBuilder(Configuration config);  CoreConfigurationBuilder(ConfigurationContext context); @Override Configuration build();  }
@Test public void addCorePropertyConverters() throws Exception { CoreConfigurationBuilder b = new CoreConfigurationBuilder(); b.addCorePropertyConverters(); Map<TypeLiteral<?>, List<PropertyConverter<?>>> converters = b.getPropertyConverter(); assertThat(converters).containsKey(TypeLiteral.<BigDecimal>of(BigDecimal.class)); assertThat(converters).containsKey(TypeLiteral.<BigInteger>of(BigInteger.class)); assertThat(converters).containsKey(TypeLiteral.<Boolean>of(Boolean.class)); assertThat(converters).containsKey(TypeLiteral.<Byte>of(Byte.class)); assertThat(converters).containsKey(TypeLiteral.<Character>of(Character.class)); assertThat(converters).containsKey(TypeLiteral.<Class<?>>of(Class.class)); assertThat(converters).containsKey(TypeLiteral.<Currency>of(Currency.class)); assertThat(converters).containsKey(TypeLiteral.<Double>of(Double.class)); assertThat(converters).containsKey(TypeLiteral.<File>of(File.class)); assertThat(converters).containsKey(TypeLiteral.<Float>of(Float.class)); assertThat(converters).containsKey(TypeLiteral.<Integer>of(Integer.class)); assertThat(converters).containsKey(TypeLiteral.<Long>of(Long.class)); assertThat(converters).containsKey(TypeLiteral.<Number>of(Number.class)); assertThat(converters).containsKey(TypeLiteral.<Path>of(Path.class)); assertThat(converters).containsKey(TypeLiteral.<Short>of(Short.class)); assertThat(converters).containsKey(TypeLiteral.<URI>of(URI.class)); assertThat(converters).containsKey(TypeLiteral.<URL>of(URL.class)); }