@Override public List<String> get(ParameterMap map, String resourceName) { return map.get(resourceName); } }
options.set(key.toLowerCase(), value); operands = options.get("DEFAULT".toLowerCase());
@Override public List<String> get(ParameterMap map, String resourceName) { return map.get(resourceName); } }
/** * Get option values, that might come from the command line * or from the environment. Return the default value for the * option if not otherwise specified. This method works with options * for with multiple() is true. */ protected List<String> getOptions(String name) { List<String> val = options.get(name); if (val.isEmpty()) { String v = env.getStringOption(name); if (v != null) { val.add(v); } } if (val.isEmpty()) { // no value, find the default ParamModel opt = commandModel.getModelFor(name); // if no value was specified and there's a default value, return it if (opt != null) { String def = opt.getParam().defaultValue(); if (ok(def)) { val.add(def); } } } return val; } /**
initializePasswords(); if (!programOpts.isTerse() && !(params.size() == 1 && params.get("help") != null)) {
initializePasswords(); if (!programOpts.isTerse() && !(params.size() == 1 && params.get("help") != null)) {
opt.getType() == File[].class)) { sawFile = true; for (String fname : options.get(opt.getName())) { final File optionFile = new File(fname); sawDirectory |= optionFile.isDirectory();
opt.getType() == File[].class)) { sawFile = true; for (String fname : options.get(opt.getName())) { final File optionFile = new File(fname); sawDirectory |= optionFile.isDirectory();
List<String> value = parameters.get("DEFAULT"); if (value != null && value.size() > 0) {
options.set(key.toLowerCase(Locale.ENGLISH), value); operands = options.get("default"); // "DEFAULT".toLowerCase() List<String> paramValues = new ArrayList<String>(options.get(paramName.toLowerCase(Locale.ENGLISH))); if (!opt.getParam().alias().isEmpty() && !paramName.equalsIgnoreCase(opt.getParam().alias())){ paramValues.addAll(options.get(opt.getParam().alias().toLowerCase(Locale.ENGLISH)));
options.set(key.toLowerCase(Locale.ENGLISH), value); operands = options.get("default"); // "DEFAULT".toLowerCase() List<String> paramValues = new ArrayList<String>(options.get(paramName.toLowerCase(Locale.ENGLISH))); if (!opt.getParam().alias().isEmpty() && !paramName.equalsIgnoreCase(opt.getParam().alias())) { paramValues.addAll(options.get(opt.getParam().alias().toLowerCase(Locale.ENGLISH)));