本文整理了Java中com.typesafe.config.Config.getBooleanList()
方法的一些代码示例,展示了Config.getBooleanList()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Config.getBooleanList()
方法的具体详情如下:
包路径:com.typesafe.config.Config
类名称:Config
方法名:getBooleanList
暂无
代码示例来源:origin: kairosdb/kairosdb
@Override
public List<?> extractListValue(Config config, String path) {
return config.getBooleanList(path);
}
},
代码示例来源:origin: apache/drill
@Override
public List<Boolean> getBooleanList(String path) {
return c.getBooleanList(path);
}
代码示例来源:origin: atomix/atomix
return config.getBooleanList(configPropName);
} catch (ConfigException.WrongType e) {
return config.getStringList(configPropName)
代码示例来源:origin: mpusher/mpush
private static Object getListValue(Class<?> beanClass, Type parameterType, Class<?> parameterClass, Config config, String configPropName) {
Type elementType = ((ParameterizedType) parameterType).getActualTypeArguments()[0];
if (elementType == Boolean.class) {
return config.getBooleanList(configPropName);
} else if (elementType == Integer.class) {
return config.getIntList(configPropName);
} else if (elementType == Double.class) {
return config.getDoubleList(configPropName);
} else if (elementType == Long.class) {
return config.getLongList(configPropName);
} else if (elementType == String.class) {
return config.getStringList(configPropName);
} else if (elementType == Duration.class) {
return config.getDurationList(configPropName);
} else if (elementType == ConfigMemorySize.class) {
return config.getMemorySizeList(configPropName);
} else if (elementType == Object.class) {
return config.getAnyRefList(configPropName);
} else if (elementType == Config.class) {
return config.getConfigList(configPropName);
} else if (elementType == ConfigObject.class) {
return config.getObjectList(configPropName);
} else if (elementType == ConfigValue.class) {
return config.getList(configPropName);
} else {
throw new ConfigException.BadBean("Bean property '" + configPropName + "' of class " + beanClass.getName() + " has unsupported list element type " + elementType);
}
}
代码示例来源:origin: dremio/dremio-oss
@Override
public List<Boolean> getBooleanList(String path) {
return config.getBooleanList(path);
}
代码示例来源:origin: org.apache.drill/drill-common
@Override
public List<Boolean> getBooleanList(String path) {
return c.getBooleanList(path);
}
代码示例来源:origin: racc/typesafeconfig-guice
@Override
public List<?> extractListValue(Config config, String path) {
return config.getBooleanList(path);
}
},
代码示例来源:origin: com.github.ddth/ddth-commons-core
/**
* Get a configuration as list of Booleans. Return {@code null} if missing or wrong type.
*
* @param config
* @param path
* @return
*/
public static List<Boolean> getBooleanList(Config config, String path) {
try {
return config.getBooleanList(path);
} catch (ConfigException.Missing | ConfigException.WrongType e) {
if (e instanceof ConfigException.WrongType) {
LOGGER.warn(e.getMessage(), e);
}
return null;
}
}
代码示例来源:origin: io.atomix/atomix-utils
return config.getBooleanList(configPropName);
} catch (ConfigException.WrongType e) {
return config.getStringList(configPropName)
代码示例来源:origin: com.github.mpusher/mpush-tools
private static Object getListValue(Class<?> beanClass, Type parameterType, Class<?> parameterClass, Config config, String configPropName) {
Type elementType = ((ParameterizedType) parameterType).getActualTypeArguments()[0];
if (elementType == Boolean.class) {
return config.getBooleanList(configPropName);
} else if (elementType == Integer.class) {
return config.getIntList(configPropName);
} else if (elementType == Double.class) {
return config.getDoubleList(configPropName);
} else if (elementType == Long.class) {
return config.getLongList(configPropName);
} else if (elementType == String.class) {
return config.getStringList(configPropName);
} else if (elementType == Duration.class) {
return config.getDurationList(configPropName);
} else if (elementType == ConfigMemorySize.class) {
return config.getMemorySizeList(configPropName);
} else if (elementType == Object.class) {
return config.getAnyRefList(configPropName);
} else if (elementType == Config.class) {
return config.getConfigList(configPropName);
} else if (elementType == ConfigObject.class) {
return config.getObjectList(configPropName);
} else if (elementType == ConfigValue.class) {
return config.getList(configPropName);
} else {
throw new ConfigException.BadBean("Bean property '" + configPropName + "' of class " + beanClass.getName() + " has unsupported list element type " + elementType);
}
}
内容来源于网络,如有侵权,请联系作者删除!