@Test public void getValue() { final String myProp = ConfigProvider.getConfig().getValue("my.prop", String.class); assertEquals("intercepted 1", myProp); }
@Override public ConfigValue getValue(final ConfigSourceInterceptorContext context, final String name) { final ConfigValue configValue = context.proceed(name); if (configValue != null) { return configValue.withValue("intercepted " + configValue.getValue()); } return configValue; }
ExampleInterceptor implements ConfigSourceInterceptor { @Override public ConfigValue getValue(final ConfigSourceInterceptorContext context, final String name) { final ConfigValue configValue = context.proceed(name); if (configValue != null) { return configValue.withValue("intercepted " + configValue.getValue()); } return configValue; } }
ExampleInterceptor implements ConfigSourceInterceptor { @Override public ConfigValue getValue(final ConfigSourceInterceptorContext context, final String name) { final ConfigValue configValue = context.proceed(name); if (configValue != null) { return configValue.withValue("intercepted " + configValue.getValue()); } return configValue; }  }
ExampleInterceptor implements ConfigSourceInterceptor { @Override public ConfigValue getValue(final ConfigSourceInterceptorContext context, final String name) { final ConfigValue configValue = context.proceed(name); if (configValue != null) { return configValue.withValue("intercepted " + configValue.getValue()); } return configValue; }  @Override ConfigValue getValue(final ConfigSourceInterceptorContext context, final String name); }
ExampleInterceptor implements ConfigSourceInterceptor { @Override public ConfigValue getValue(final ConfigSourceInterceptorContext context, final String name) { final ConfigValue configValue = context.proceed(name); if (configValue != null) { return configValue.withValue("intercepted " + configValue.getValue()); } return configValue; }  @Override ConfigValue getValue(final ConfigSourceInterceptorContext context, final String name);  }