@Test @SuppressWarnings({ "rawtypes", "unchecked" }) public void addPropertyConverter() throws Exception { PropertyConverter converter = (value, ctx) -> value.toLowerCase(); ConfigurationBuilder b = new CoreConfigurationBuilder() .addPropertyConverters(TypeLiteral.of(String.class), converter); Configuration cfg = b.build(); ConfigurationContext ctx = cfg.getContext(); assertThat(ctx.getPropertyConverters(TypeLiteral.of(String.class))).contains(converter); assertThat(ctx.getPropertyConverters()).hasSize(1); b = new CoreConfigurationBuilder() .addPropertyConverters(TypeLiteral.of(String.class), converter); b.addPropertyConverters(TypeLiteral.of(String.class), converter); assertThat(ctx.getPropertyConverters()).hasSize(1); }
@Override public Configuration build() { Configuration cfg = new CoreConfiguration( new DefaultConfigurationContext( serviceContext, this.propertyFilters, this.propertySources, this.propertyConverters, this.metaDataProvider )); built = true; return cfg; }
CoreConfigurationBuilder extends DefaultConfigurationBuilder { @Override public Configuration build() { Configuration cfg = new CoreConfiguration( new DefaultConfigurationContext( serviceContext, this.propertyFilters, this.propertySources, this.propertyConverters, this.metaDataProvider )); built = true; return cfg; } }
CoreConfigurationBuilder extends DefaultConfigurationBuilder { @Override public Configuration build() { Configuration cfg = new CoreConfiguration( new DefaultConfigurationContext( serviceContext, this.propertyFilters, this.propertySources, this.propertyConverters, this.metaDataProvider )); built = true; return cfg; } CoreConfigurationBuilder();  CoreConfigurationBuilder(Configuration config);  CoreConfigurationBuilder(ConfigurationContext context); }
CoreConfigurationBuilder extends DefaultConfigurationBuilder { @Override public Configuration build() { Configuration cfg = new CoreConfiguration( new DefaultConfigurationContext( serviceContext, this.propertyFilters, this.propertySources, this.propertyConverters, this.metaDataProvider )); built = true; return cfg; } CoreConfigurationBuilder();  CoreConfigurationBuilder(Configuration config);  CoreConfigurationBuilder(ConfigurationContext context); @Override Configuration build(); }
CoreConfigurationBuilder extends DefaultConfigurationBuilder { @Override public Configuration build() { Configuration cfg = new CoreConfiguration( new DefaultConfigurationContext( serviceContext, this.propertyFilters, this.propertySources, this.propertyConverters, this.metaDataProvider )); built = true; return cfg; } CoreConfigurationBuilder();  CoreConfigurationBuilder(Configuration config);  CoreConfigurationBuilder(ConfigurationContext context); @Override Configuration build();  }