@Test public void testGetFromDir() { ConfigGetter<AppConfig> getter = new ConfigGetter<>(AppConfig.class); AppConfig config = getter.getConfig("dir:src/test/resources/configs/foo/"); verifyFooValues(config); }
public synchronized T getConfig(String configId) { try (ConfigSubscriber subscriber = source == null ? new ConfigSubscriber() : new ConfigSubscriber(source)) { ConfigHandle<T> handle = subscriber.subscribe(clazz, configId); subscriber.nextConfig(); return handle.getConfig(); } }
ConfigGetter { public synchronized T getConfig(String configId) { try (ConfigSubscriber subscriber = source == null ? new ConfigSubscriber() : new ConfigSubscriber(source)) { ConfigHandle<T> handle = subscriber.subscribe(clazz, configId); subscriber.nextConfig(); return handle.getConfig(); } } }
ConfigGetter { public synchronized T getConfig(String configId) { try (ConfigSubscriber subscriber = source == null ? new ConfigSubscriber() : new ConfigSubscriber(source)) { ConfigHandle<T> handle = subscriber.subscribe(clazz, configId); subscriber.nextConfig(); return handle.getConfig(); } } ConfigGetter(Class<T> clazz);  ConfigGetter(ConfigSource source, Class<T> clazz); }
ConfigGetter { public synchronized T getConfig(String configId) { try (ConfigSubscriber subscriber = source == null ? new ConfigSubscriber() : new ConfigSubscriber(source)) { ConfigHandle<T> handle = subscriber.subscribe(clazz, configId); subscriber.nextConfig(); return handle.getConfig(); } } ConfigGetter(Class<T> clazz);  ConfigGetter(ConfigSource source, Class<T> clazz); synchronized T getConfig(String configId); static T getConfig(Class<T> c, String configId); static T getConfig(Class<T> c, String configId, ConfigSource source); }
ConfigGetter { public synchronized T getConfig(String configId) { try (ConfigSubscriber subscriber = source == null ? new ConfigSubscriber() : new ConfigSubscriber(source)) { ConfigHandle<T> handle = subscriber.subscribe(clazz, configId); subscriber.nextConfig(); return handle.getConfig(); } } ConfigGetter(Class<T> clazz);  ConfigGetter(ConfigSource source, Class<T> clazz); synchronized T getConfig(String configId); static T getConfig(Class<T> c, String configId); static T getConfig(Class<T> c, String configId, ConfigSource source);  }