/** * Return a list of Path property values associated with the given key, * or {@code defaultValue} if the key cannot be resolved. * * @param key the property name to resolve * @return The list of Path properties * @throws IllegalStateException if the value cannot be mapped to an array of strings */ public List<Path> getPathList(String key) { List<Path> pathList = new ArrayList<>(); try { String[] stringList = configuration.getStringArray(key); for (String pathStr : stringList) { pathList.add(Paths.get(pathStr)); } } catch (ConversionException ce) { throw new IllegalStateException(String.format("requested key [%s] is not convertable to an array", key)); } return pathList; }
public List<String> getDebugFlags() { return Arrays.asList(_config.getStringArray(ARG_DEBUG_FLAGS)); }
/** * Return a list of Path property values associated with the given key, * or {@code defaultValue} if the key cannot be resolved. * * @param key the property name to resolve * @return The list of Path properties * @throws IllegalStateException if the value cannot be mapped to an array of strings */ public List<Path> getPathList(String key) { List<Path> pathList = new ArrayList<>(); try { String[] stringList = configuration.getStringArray(key); for (String pathStr : stringList) { pathList.add(Paths.get(pathStr)); } } catch (ConversionException ce) { throw new IllegalStateException(String.format("requested key [%s] is not convertable to an array", key)); } return pathList; }
/** * Return a list of Path property values associated with the given key, * or {@code defaultValue} if the key cannot be resolved. * * @param key the property name to resolve * @return The list of Path properties * @throws IllegalStateException if the value cannot be mapped to an array of strings */ public List<Path> getPathList(String key) { List<Path> pathList = new ArrayList<>(); try { String[] stringList = configuration.getStringArray(key); for (String pathStr : stringList) { pathList.add(Paths.get(pathStr)); } } catch (ConversionException ce) { throw new IllegalStateException(String.format("requested key [%s] is not convertable to an array", key)); } return pathList; }
@Override public void onStartup(ServletContext servletContext) throws ServletException { final Configuration config = StaticConfigSupplier.getConfiguration(); String[] rootConfigBeanClassNames = config.getStringArray("integration.root_config_bean_classes"); String[] servletConfigBeanClassNames = config.getStringArray("integration.servlet_config_bean_classes");
for (String name : props.getStringArray("name")) { String type = props.getString(name + ".type"); Class<? extends Command> commandType; String[] aliases = props.getStringArray(name + ".alias"); if (!ArrayUtils.isEmpty(aliases)) { for (String alias : aliases) {
return (T) getConfiguration().getStringArray(name); } else if (String.class.equals(type) || type.isAssignableFrom(String.class)) { return (T) getConfiguration().getString(name);