Source:
public void appendAllParametersDetails(StringBuilder out, int indentCount, String indent, List<ParameterDescription> sortedParameters) { if (sortedParameters.size() > 0) out.append(indent).append(" Options:\n"); for (ParameterDescription pd : sortedParameters) { WrappedParameter parameter = pd.getParameter(); String description = pd.getDescription(); boolean hasDescription = !description.isEmpty(); out.append(indent) .append(" ") .append(parameter.required() ? "* " : " ") .append(pd.getNames()) .append("\n"); if (hasDescription) wrapDescription(out, indentCount, s(indentCount) + description); Object def = pd.getDefault(); if (pd.isDynamicParameter()) { String syntax = "Syntax: " + parameter.names()[0] + "key" + parameter.getAssignment() + "value"; if (hasDescription) out.append(newLineAndIndent(indentCount)); else out.append(s(indentCount)); out.append(syntax); } if (def != null && !pd.isHelp()) { String displayedDef = Strings.isStringEmpty(def.toString()) ? "<empty string>" : def.toString(); String defaultText = "Default: " + (parameter.password() ? "********" : displayedDef); if (hasDescription) out.append(newLineAndIndent(indentCount)); else out.append(s(indentCount)); out.append(defaultText); } Class<?> type = pd.getParameterized().getType(); if (type.isEnum()) { String valueList = EnumSet.allOf((Class<? extends Enum>) type).toString(); String possibleValues = "Possible Values: " + valueList; if (!description.contains("Options: " + valueList)) { if (hasDescription) out.append(newLineAndIndent(indentCount)); else out.append(s(indentCount)); out.append(possibleValues); } } out.append("\n"); } }

Target:
public void appendAllParametersDetails(StringBuilder out, int indentCount, String indent, List<ParameterDescription> sortedParameters) { if (sortedParameters.size() > 0) { out.append(indent).append(" Options:\n"); } for (ParameterDescription pd : sortedParameters) { WrappedParameter parameter = pd.getParameter(); String description = pd.getDescription(); boolean hasDescription = !description.isEmpty(); out.append(indent) .append(" ") .append(parameter.required() ? "* " : " ") .append(pd.getNames()) .append("\n"); if (hasDescription) { wrapDescription(out, indentCount, s(indentCount) + description); } Object def = pd.getDefault(); if (pd.isDynamicParameter()) { String syntax = "Syntax: " + parameter.names()[0] + "key" + parameter.getAssignment() + "value"; if (hasDescription) { out.append(newLineAndIndent(indentCount)); } else { out.append(s(indentCount)); } out.append(syntax); } if (def != null && !pd.isHelp()) { String displayedDef = Strings.isStringEmpty(def.toString()) ? "<empty string>" : def.toString(); String defaultText = "Default: " + (parameter.password() ? "********" : displayedDef); if (hasDescription) { out.append(newLineAndIndent(indentCount)); } else { out.append(s(indentCount)); } out.append(defaultText); } Class<?> type = pd.getParameterized().getType(); if (type.isEnum()) { String valueList = EnumSet.allOf((Class<? extends Enum>) type).toString(); String possibleValues = "Possible Values: " + valueList; if (!description.contains("Options: " + valueList)) { if (hasDescription) { out.append(newLineAndIndent(indentCount)); } else { out.append(s(indentCount)); } out.append(possibleValues); } } out.append("\n"); } }