Github user britter commented on a diff in the pull request:
https://github.com/apache/commons-lang/pull/213#discussion_r89192411
--- Diff: src/main/java/org/apache/commons/lang3/StringEscapeUtils.java ---
@@ -429,6 +429,65 @@ public StringEscapeUtils() {
super();
}
+ /**
+ * <p>Convenience wrapper for {@link java.lang.StringBuilder}
providing escape methods.</p>
+ *
+ * <p>Example:</p>
+ * <pre>
+ * new Builder(ESCAPE_HTML4)
+ * .append("<p>")
+ * .escape("This is paragraph 1 and special chars like & get
escaped.")
+ * .append("</p><p>")
+ * .escape("This is paragraph 2 & more...")
+ * .append("</p>")
+ * .toString()
+ * </pre>
+ *
+ * @since 3.6
+ */
+ public static class Builder {
+
+ private final StringBuilder sb;
+ private final CharSequenceTranslator translator;
+
+ public Builder(final CharSequenceTranslator translator) {
--- End diff --
This is true for `BasicThreadFactory.Builder` which has to be constructed
using the default constructor (yiaks) but not for
`TypeUtils.WildcardTypeBuilder` which has static factory methods and a private
constructor. I prefer the latter approach.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---