@Test(expectedExceptions = RuntimeException.class) public void testGetAnyRefList() throws Exception { ParsecConfig confWrapper = getConfig(); List<?> configList = confWrapper.getAnyRefList("configList"); String[] keys = new String[] {"key1","key2"}; String[] values = new String[] {"val1","val2"}; int idx = 0; for (Object conf : configList) { assertTrue(conf instanceof Map); Map<String, String> setting = (Map<String, String>) conf; assertEquals(setting.get(keys[idx]), values[idx]); ++idx; } confWrapper.getAnyRefList("notExist"); }
@Override public List<? extends Object> getAnyRefList(String path) { try { return configDelegate.getAnyRefList(path); } catch (ConfigException e) { throw new RuntimeException(e); } }
TypeSafeConfWrapper implements ParsecConfig { @Override public List<? extends Object> getAnyRefList(String path) { try { return configDelegate.getAnyRefList(path); } catch (ConfigException e) { throw new RuntimeException(e); } } }
TypeSafeConfWrapper implements ParsecConfig { @Override public List<? extends Object> getAnyRefList(String path) { try { return configDelegate.getAnyRefList(path); } catch (ConfigException e) { throw new RuntimeException(e); } } TypeSafeConfWrapper(Config conf); }
TypeSafeConfWrapper implements ParsecConfig { @Override public List<? extends Object> getAnyRefList(String path) { try { return configDelegate.getAnyRefList(path); } catch (ConfigException e) { throw new RuntimeException(e); } } TypeSafeConfWrapper(Config conf); @Override String getString(String key); @Override boolean isEmpty(); @Override boolean getBoolean(String path); @Override Number getNumber(String path); @Override int getInt(String path); @Override long getLong(String path); @Override double getDouble(String path); @Override long getDuration(String path, TimeUnit unit); @Override Duration getDuration(String path); @Override List<Boolean> getBooleanList(String path); @Override List<Number> getNumberList(String path); @Override List<Integer> getIntList(String path); @Override List<Long> getLongList(String path); @Override List<Double> getDoubleList(String path); @Override List<String> getStringList(String path); @Override List<? extends ParsecConfig> getConfigList(String path); @Override List<Long> getDurationList(String path, TimeUnit unit); @Override List<Duration> getDurationList(String path); @Override Object getAnyRef(String path); @Override List<? extends Object> getAnyRefList(String path); @Override ParsecConfig getConfig(String path); }
TypeSafeConfWrapper implements ParsecConfig { @Override public List<? extends Object> getAnyRefList(String path) { try { return configDelegate.getAnyRefList(path); } catch (ConfigException e) { throw new RuntimeException(e); } } TypeSafeConfWrapper(Config conf); @Override String getString(String key); @Override boolean isEmpty(); @Override boolean getBoolean(String path); @Override Number getNumber(String path); @Override int getInt(String path); @Override long getLong(String path); @Override double getDouble(String path); @Override long getDuration(String path, TimeUnit unit); @Override Duration getDuration(String path); @Override List<Boolean> getBooleanList(String path); @Override List<Number> getNumberList(String path); @Override List<Integer> getIntList(String path); @Override List<Long> getLongList(String path); @Override List<Double> getDoubleList(String path); @Override List<String> getStringList(String path); @Override List<? extends ParsecConfig> getConfigList(String path); @Override List<Long> getDurationList(String path, TimeUnit unit); @Override List<Duration> getDurationList(String path); @Override Object getAnyRef(String path); @Override List<? extends Object> getAnyRefList(String path); @Override ParsecConfig getConfig(String path);  }