/** * Appends the usage clause for an Argument to a StringBuilder. * * @param buff the StringBuilder to append to * @param argument the argument to add * @param required whether the Option is required or not */ protected void appendArgument(StringBuilder buff, Argument argument, boolean required) { if (argument.isHidden()) { return; } if (!required) { buff.append("["); } buff.append(argument.getArgName()); if (argument.isMultiValued()) { buff.append("..."); } // if the Option is not a required option if (!required) { buff.append("]"); } }
static void toJson(Argument obj, java.util.Map<String, Object> json) { if (obj.getArgName() != null) { json.put("argName", obj.getArgName()); } if (obj.getDefaultValue() != null) { json.put("defaultValue", obj.getDefaultValue()); } if (obj.getDescription() != null) { json.put("description", obj.getDescription()); } json.put("hidden", obj.isHidden()); json.put("index", obj.getIndex()); json.put("multiValued", obj.isMultiValued()); json.put("required", obj.isRequired()); } }
throw new CLIException("Only the last argument can be multi-valued"); multiValue = argument.isMultiValued(); if (current != null) { commandLine.setRawValue(current, v); if (!current.isMultiValued()) { if (iterator.hasNext()) { current = iterator.next();
/** * Appends the usage clause for an Argument to a StringBuilder. * * @param buff the StringBuilder to append to * @param argument the argument to add * @param required whether the Option is required or not */ protected void appendArgument(StringBuilder buff, Argument argument, boolean required) { if (argument.isHidden()) { return; } if (!required) { buff.append("["); } buff.append(argument.getArgName()); if (argument.isMultiValued()) { buff.append("..."); } // if the Option is not a required option if (!required) { buff.append("]"); } }
static void toJson(Argument obj, java.util.Map<String, Object> json) { if (obj.getArgName() != null) { json.put("argName", obj.getArgName()); } if (obj.getDefaultValue() != null) { json.put("defaultValue", obj.getDefaultValue()); } if (obj.getDescription() != null) { json.put("description", obj.getDescription()); } json.put("hidden", obj.isHidden()); json.put("index", obj.getIndex()); json.put("multiValued", obj.isMultiValued()); json.put("required", obj.isRequired()); } }
throw new CLIException("Only the last argument can be multi-valued"); multiValue = argument.isMultiValued(); if (current != null) { commandLine.setRawValue(current, v); if (!current.isMultiValued()) { if (iterator.hasNext()) { current = iterator.next();