@Test public void testSimple() throws ConfigurationException { Configurator conf = new Configurator(new Configuration()); Integer i = conf.get(Integer.class, "foo"); assertEquals(i, 42); Integer j = conf.get(Integer.class, "bar"); assertEquals(j, 23); Integer k = conf.get(Integer.class, "baz"); assertEquals(k, 0); Integer l = conf.get(Integer.class, "biff"); assertEquals(l, 1); }
public <T> T get(Class<T> klass, String name) throws ConfigurationException { return get(klass, name, null); }
Configurator implements Cloneable { public <T> T get(Class<T> klass, String name) throws ConfigurationException { return get(klass, name, null); } }
Configurator implements Cloneable { public <T> T get(Class<T> klass, String name) throws ConfigurationException { return get(klass, name, null); } Configurator(Configuration conf); }
Configurator implements Cloneable { public <T> T get(Class<T> klass, String name) throws ConfigurationException { return get(klass, name, null); } Configurator(Configuration conf); Configuration getConf(); T get(Class<T> klass, String name); T get(Class<T> klass, String name, String runtimeKey, String runtimeValue); T get(Class<T> klass, String name, Map<String, String> runtimeParams); String resolveComponentName(Class klass, String name); Config getConfig(Class klass, String name); T construct(Class<T> klass, String name, Config conf, Map<String, String> runtimeParams); T get(Class<T> klass); void close(); }
Configurator implements Cloneable { public <T> T get(Class<T> klass, String name) throws ConfigurationException { return get(klass, name, null); } Configurator(Configuration conf); Configuration getConf(); T get(Class<T> klass, String name); T get(Class<T> klass, String name, String runtimeKey, String runtimeValue); T get(Class<T> klass, String name, Map<String, String> runtimeParams); String resolveComponentName(Class klass, String name); Config getConfig(Class klass, String name); T construct(Class<T> klass, String name, Config conf, Map<String, String> runtimeParams); T get(Class<T> klass); void close(); static final int MAX_FILE_SIZE; }