This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-lang.git
The following commit(s) were added to refs/heads/master by this push:
new 970e4d664 Javadoc
970e4d664 is described below
commit 970e4d66452c146165233129c913616ff666ff77
Author: Gary D. Gregory <[email protected]>
AuthorDate: Mon Sep 29 16:24:03 2025 -0400
Javadoc
Reduce vertical whitespace
---
.../commons/lang3/builder/ToStringStyle.java | 1175 +++++++++-----------
1 file changed, 503 insertions(+), 672 deletions(-)
diff --git a/src/main/java/org/apache/commons/lang3/builder/ToStringStyle.java
b/src/main/java/org/apache/commons/lang3/builder/ToStringStyle.java
index b56e2112d..7cfc09372 100644
--- a/src/main/java/org/apache/commons/lang3/builder/ToStringStyle.java
+++ b/src/main/java/org/apache/commons/lang3/builder/ToStringStyle.java
@@ -14,6 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package org.apache.commons.lang3.builder;
import java.io.Serializable;
@@ -31,36 +32,35 @@
import org.apache.commons.lang3.Strings;
/**
- * Controls {@link String} formatting for {@link ToStringBuilder}.
- * The main public interface is always via {@link ToStringBuilder}.
+ * Controls {@link String} formatting for {@link ToStringBuilder}. The main
public interface is always via {@link ToStringBuilder}.
*
- * <p>These classes are intended to be used as <em>singletons</em>.
- * There is no need to instantiate a new style each time. A program
- * will generally use one of the predefined constants on this class.
- * Alternatively, the {@link StandardToStringStyle} class can be used
- * to set the individual settings. Thus most styles can be achieved
- * without subclassing.</p>
+ * <p>
+ * These classes are intended to be used as <em>singletons</em>. There is no
need to instantiate a new style each time. A program will generally use one of
the
+ * predefined constants on this class. Alternatively, the {@link
StandardToStringStyle} class can be used to set the individual settings. Thus
most styles can
+ * be achieved without subclassing.
+ * </p>
*
- * <p>If required, a subclass can override as many or as few of the
- * methods as it requires. Each object type (from {@code boolean}
- * to {@code long} to {@link Object} to {@code int[]}) has
- * its own methods to output it. Most have two versions, detail and summary.
+ * <p>
+ * If required, a subclass can override as many or as few of the methods as it
requires. Each object type (from {@code boolean} to {@code long} to
+ * {@link Object} to {@code int[]}) has its own methods to output it. Most
have two versions, detail and summary.
*
- * <p>For example, the detail version of the array based methods will
- * output the whole array, whereas the summary method will just output
- * the array length.</p>
+ * <p>
+ * For example, the detail version of the array based methods will output the
whole array, whereas the summary method will just output the array length.
+ * </p>
*
- * <p>If you want to format the output of certain objects, such as dates, you
- * must create a subclass and override a method.
+ * <p>
+ * If you want to format the output of certain objects, such as dates, you
must create a subclass and override a method.
* </p>
+ *
* <pre>
* public class MyStyle extends ToStringStyle {
- * protected void appendDetail(StringBuffer buffer, String fieldName, Object
value) {
- * if (value instanceof Date) {
- * value = new SimpleDateFormat("yyyy-MM-dd").format(value);
+ *
+ * protected void appendDetail(StringBuffer buffer, String fieldName,
Object value) {
+ * if (value instanceof Date) {
+ * value = new SimpleDateFormat("yyyy-MM-dd").format(value);
+ * }
+ * buffer.append(value);
* }
- * buffer.append(value);
- * }
* }
* </pre>
*
@@ -72,22 +72,25 @@ public abstract class ToStringStyle implements Serializable
{
/**
* Default {@link ToStringStyle}.
*
- * <p>This is an inner class rather than using
- * {@link StandardToStringStyle} to ensure its immutability.</p>
+ * <p>
+ * This is an inner class rather than using {@link StandardToStringStyle}
to ensure its immutability.
+ * </p>
*/
private static final class DefaultToStringStyle extends ToStringStyle {
/**
* Required for serialization support.
*
- * @see java.io.Serializable
+ * @see Serializable
*/
private static final long serialVersionUID = 1L;
/**
* Constructs a new instance.
*
- * <p>Use the static constant rather than instantiating.</p>
+ * <p>
+ * Use the static constant rather than instantiating.
+ * </p>
*/
DefaultToStringStyle() {
}
@@ -95,20 +98,18 @@ private static final class DefaultToStringStyle extends
ToStringStyle {
/**
* Ensure Singleton after serialization.
*
- * @return the singleton
+ * @return the singleton.
*/
private Object readResolve() {
return DEFAULT_STYLE;
}
-
}
/**
* {@link ToStringStyle} that outputs with JSON format.
*
* <p>
- * This is an inner class rather than using
- * {@link StandardToStringStyle} to ensure its immutability.
+ * This is an inner class rather than using {@link StandardToStringStyle}
to ensure its immutability.
* </p>
*
* @since 3.4
@@ -117,7 +118,6 @@ private Object readResolve() {
private static final class JsonToStringStyle extends ToStringStyle {
private static final long serialVersionUID = 1L;
-
private static final String FIELD_NAME_QUOTE = "\"";
/**
@@ -130,21 +130,15 @@ private static final class JsonToStringStyle extends
ToStringStyle {
JsonToStringStyle() {
setUseClassName(false);
setUseIdentityHashCode(false);
-
setContentStart("{");
setContentEnd("}");
-
setArrayStart("[");
setArrayEnd("]");
-
setFieldSeparator(",");
setFieldNameValueSeparator(":");
-
setNullText("null");
-
setSummaryObjectStartText("\"<");
setSummaryObjectEndText(">\"");
-
setSizeStartText("\"<size=");
setSizeEndText(">\"");
}
@@ -232,7 +226,6 @@ protected void appendDetail(final StringBuffer buffer,
final String fieldName, f
protected void appendDetail(final StringBuffer buffer, final String
fieldName, final Map<?, ?> map) {
if (map != null && !map.isEmpty()) {
buffer.append(getContentStart());
-
boolean firstItem = true;
for (final Entry<?, ?> entry : map.entrySet()) {
final String keyStr = Objects.toString(entry.getKey(),
null);
@@ -251,55 +244,45 @@ protected void appendDetail(final StringBuffer buffer,
final String fieldName, f
}
}
}
-
buffer.append(getContentEnd());
return;
}
-
buffer.append(map);
}
@Override
protected void appendDetail(final StringBuffer buffer, final String
fieldName, final Object value) {
-
if (value == null) {
appendNullText(buffer, fieldName);
return;
}
-
if (value instanceof String || value instanceof Character) {
appendValueAsString(buffer, value.toString());
return;
}
-
if (value instanceof Number || value instanceof Boolean) {
buffer.append(value);
return;
}
-
final String valueAsString = value.toString();
if (isJsonObject(valueAsString) || isJsonArray(valueAsString)) {
buffer.append(value);
return;
}
-
appendDetail(buffer, fieldName, valueAsString);
}
@Override
protected void appendFieldStart(final StringBuffer buffer, final
String fieldName) {
-
checkFieldName(fieldName);
-
- super.appendFieldStart(buffer, FIELD_NAME_QUOTE +
StringEscapeUtils.escapeJson(fieldName)
- + FIELD_NAME_QUOTE);
+ super.appendFieldStart(buffer, FIELD_NAME_QUOTE +
StringEscapeUtils.escapeJson(fieldName) + FIELD_NAME_QUOTE);
}
/**
* Appends the given String enclosed in double-quotes to the given
StringBuffer.
*
* @param buffer the StringBuffer to append the value to.
- * @param value the value to append.
+ * @param value the value to append.
*/
private void appendValueAsString(final StringBuffer buffer, final
String value) {
buffer.append('"').append(StringEscapeUtils.escapeJson(value)).append('"');
@@ -323,13 +306,11 @@ private void checkIsFullDetail(final Boolean fullDetail) {
}
private boolean isJsonArray(final String valueAsString) {
- return valueAsString.startsWith(getArrayStart())
- && valueAsString.endsWith(getArrayEnd());
+ return valueAsString.startsWith(getArrayStart()) &&
valueAsString.endsWith(getArrayEnd());
}
private boolean isJsonObject(final String valueAsString) {
- return valueAsString.startsWith(getContentStart())
- && valueAsString.endsWith(getContentEnd());
+ return valueAsString.startsWith(getContentStart()) &&
valueAsString.endsWith(getContentEnd());
}
/**
@@ -340,14 +321,14 @@ private boolean isJsonObject(final String valueAsString) {
private Object readResolve() {
return JSON_STYLE;
}
-
}
/**
* {@link ToStringStyle} that outputs on multiple lines.
*
- * <p>This is an inner class rather than using
- * {@link StandardToStringStyle} to ensure its immutability.</p>
+ * <p>
+ * This is an inner class rather than using {@link StandardToStringStyle}
to ensure its immutability.
+ * </p>
*/
private static final class MultiLineToStringStyle extends ToStringStyle {
@@ -356,7 +337,9 @@ private static final class MultiLineToStringStyle extends
ToStringStyle {
/**
* Constructs a new instance.
*
- * <p>Use the static constant rather than instantiating.</p>
+ * <p>
+ * Use the static constant rather than instantiating.
+ * </p>
*/
MultiLineToStringStyle() {
setContentStart("[");
@@ -368,20 +351,19 @@ private static final class MultiLineToStringStyle extends
ToStringStyle {
/**
* Ensure Singleton after serialization.
*
- * @return the singleton
+ * @return the singleton.
*/
private Object readResolve() {
return MULTI_LINE_STYLE;
}
-
}
/**
- * {@link ToStringStyle} that does not print out the class name
- * and identity hash code but prints content start and field names.
+ * {@link ToStringStyle} that does not print out the class name and
identity hash code but prints content start and field names.
*
- * <p>This is an inner class rather than using
- * {@link StandardToStringStyle} to ensure its immutability.</p>
+ * <p>
+ * This is an inner class rather than using {@link StandardToStringStyle}
to ensure its immutability.
+ * </p>
*/
private static final class NoClassNameToStringStyle extends ToStringStyle {
@@ -390,7 +372,9 @@ private static final class NoClassNameToStringStyle extends
ToStringStyle {
/**
* Constructs a new instance.
*
- * <p>Use the static constant rather than instantiating.</p>
+ * <p>
+ * Use the static constant rather than instantiating.
+ * </p>
*/
NoClassNameToStringStyle() {
setUseClassName(false);
@@ -405,15 +389,14 @@ private static final class NoClassNameToStringStyle
extends ToStringStyle {
private Object readResolve() {
return NO_CLASS_NAME_STYLE;
}
-
}
/**
- * {@link ToStringStyle} that does not print out
- * the field names.
+ * {@link ToStringStyle} that does not print out the field names.
*
- * <p>This is an inner class rather than using
- * {@link StandardToStringStyle} to ensure its immutability.
+ * <p>
+ * This is an inner class rather than using {@link StandardToStringStyle}
to ensure its immutability.
+ * </p>
*/
private static final class NoFieldNameToStringStyle extends ToStringStyle {
@@ -422,7 +405,9 @@ private static final class NoFieldNameToStringStyle extends
ToStringStyle {
/**
* Constructs a new instance.
*
- * <p>Use the static constant rather than instantiating.</p>
+ * <p>
+ * Use the static constant rather than instantiating.
+ * </p>
*/
NoFieldNameToStringStyle() {
setUseFieldNames(false);
@@ -436,15 +421,14 @@ private static final class NoFieldNameToStringStyle
extends ToStringStyle {
private Object readResolve() {
return NO_FIELD_NAMES_STYLE;
}
-
}
/**
- * {@link ToStringStyle} that prints out the short
- * class name and no identity hash code.
+ * {@link ToStringStyle} that prints out the short class name and no
identity hash code.
*
- * <p>This is an inner class rather than using
- * {@link StandardToStringStyle} to ensure its immutability.</p>
+ * <p>
+ * This is an inner class rather than using {@link StandardToStringStyle}
to ensure its immutability.
+ * </p>
*/
private static final class ShortPrefixToStringStyle extends ToStringStyle {
@@ -453,7 +437,9 @@ private static final class ShortPrefixToStringStyle extends
ToStringStyle {
/**
* Constructs a new instance.
*
- * <p>Use the static constant rather than instantiating.</p>
+ * <p>
+ * Use the static constant rather than instantiating.
+ * </p>
*/
ShortPrefixToStringStyle() {
setUseShortClassName(true);
@@ -461,21 +447,21 @@ private static final class ShortPrefixToStringStyle
extends ToStringStyle {
}
/**
- * Ensure <code>Singleton</ode> after serialization.
- * @return the singleton
+ * Ensure {@code Singleton} after serialization.
+ *
+ * @return the singleton.
*/
private Object readResolve() {
return SHORT_PREFIX_STYLE;
}
-
}
/**
- * {@link ToStringStyle} that does not print out the
- * class name, identity hash code, content start or field name.
+ * {@link ToStringStyle} that does not print out the class name, identity
hash code, content start or field name.
*
- * <p>This is an inner class rather than using
- * {@link StandardToStringStyle} to ensure its immutability.</p>
+ * <p>
+ * This is an inner class rather than using {@link StandardToStringStyle}
to ensure its immutability.
+ * </p>
*/
private static final class SimpleToStringStyle extends ToStringStyle {
@@ -484,7 +470,9 @@ private static final class SimpleToStringStyle extends
ToStringStyle {
/**
* Constructs a new instance.
*
- * <p>Use the static constant rather than instantiating.</p>
+ * <p>
+ * Use the static constant rather than instantiating.
+ * </p>
*/
SimpleToStringStyle() {
setUseClassName(false);
@@ -496,32 +484,28 @@ private static final class SimpleToStringStyle extends
ToStringStyle {
/**
* Ensure <code>Singleton</ode> after serialization.
+ *
* @return the singleton
*/
private Object readResolve() {
return SIMPLE_STYLE;
}
-
}
/**
* Serialization version ID.
*/
private static final long serialVersionUID = -2587890625525655916L;
-
/**
- * The default toString style. Using the {@code Person}
- * example from {@link ToStringBuilder}, the output would look like this:
+ * The default toString style. Using the {@code Person} example from
{@link ToStringBuilder}, the output would look like this:
*
* <pre>
* Person@182f0db[name=John Doe,age=33,smoker=false]
* </pre>
*/
public static final ToStringStyle DEFAULT_STYLE = new
DefaultToStringStyle();
-
/**
- * The multi line toString style. Using the {@code Person}
- * example from {@link ToStringBuilder}, the output would look like this:
+ * The multi line toString style. Using the {@code Person} example from
{@link ToStringBuilder}, the output would look like this:
*
* <pre>
* Person@182f0db[
@@ -532,21 +516,16 @@ private Object readResolve() {
* </pre>
*/
public static final ToStringStyle MULTI_LINE_STYLE = new
MultiLineToStringStyle();
-
/**
- * The no field names toString style. Using the
- * {@code Person} example from {@link ToStringBuilder}, the output
- * would look like this:
+ * The no field names toString style. Using the {@code Person} example
from {@link ToStringBuilder}, the output would look like this:
*
* <pre>
* Person@182f0db[John Doe,33,false]
* </pre>
*/
public static final ToStringStyle NO_FIELD_NAMES_STYLE = new
NoFieldNameToStringStyle();
-
/**
- * The short prefix toString style. Using the {@code Person} example
- * from {@link ToStringBuilder}, the output would look like this:
+ * The short prefix toString style. Using the {@code Person} example from
{@link ToStringBuilder}, the output would look like this:
*
* <pre>
* Person[name=John Doe,age=33,smoker=false]
@@ -555,20 +534,16 @@ private Object readResolve() {
* @since 2.1
*/
public static final ToStringStyle SHORT_PREFIX_STYLE = new
ShortPrefixToStringStyle();
-
/**
- * The simple toString style. Using the {@code Person}
- * example from {@link ToStringBuilder}, the output would look like this:
+ * The simple toString style. Using the {@code Person} example from {@link
ToStringBuilder}, the output would look like this:
*
* <pre>
* John Doe,33,false
* </pre>
*/
public static final ToStringStyle SIMPLE_STYLE = new SimpleToStringStyle();
-
/**
- * The no class name toString style. Using the {@code Person}
- * example from {@link ToStringBuilder}, the output would look like this:
+ * The no class name toString style. Using the {@code Person} example from
{@link ToStringBuilder}, the output would look like this:
*
* <pre>
* [name=John Doe,age=33,smoker=false]
@@ -577,70 +552,56 @@ private Object readResolve() {
* @since 3.4
*/
public static final ToStringStyle NO_CLASS_NAME_STYLE = new
NoClassNameToStringStyle();
-
/**
- * The JSON toString style. Using the {@code Person} example from
- * {@link ToStringBuilder}, the output would look like this:
+ * The JSON toString style. Using the {@code Person} example from {@link
ToStringBuilder}, the output would look like this:
*
* <pre>
* {"name": "John Doe", "age": 33, "smoker": true}
* </pre>
*
- * <strong>Note:</strong> Since field names are mandatory in JSON, this
- * ToStringStyle will throw an {@link UnsupportedOperationException} if no
- * field name is passed in while appending. Furthermore This ToStringStyle
- * will only generate valid JSON if referenced objects also produce JSON
- * when calling {@code toString()} on them.
+ * <strong>Note:</strong> Since field names are mandatory in JSON, this
ToStringStyle will throw an {@link UnsupportedOperationException} if no field
name
+ * is passed in while appending. Furthermore This ToStringStyle will only
generate valid JSON if referenced objects also produce JSON when calling
+ * {@code toString()} on them.
*
* @since 3.4
* @see <a href="https://www.json.org/">json.org</a>
*/
public static final ToStringStyle JSON_STYLE = new JsonToStringStyle();
-
/**
- * A registry of objects used by {@code reflectionToString} methods
- * to detect cyclical object references and avoid infinite loops.
+ * A registry of objects used by {@code reflectionToString} methods to
detect cyclical object references and avoid infinite loops.
*/
private static final ThreadLocal<WeakHashMap<Object, Object>> REGISTRY =
ThreadLocal.withInitial(WeakHashMap::new);
/*
- * Note that objects of this class are generally shared between threads, so
- * an instance variable would not be suitable here.
+ * Note that objects of this class are generally shared between threads,
so an instance variable would not be suitable here.
*
- * In normal use the registry should always be left empty, because the
caller
- * should call toString() which will clean up.
+ * In normal use the registry should always be left empty, because the
caller should call toString() which will clean up.
*
* See LANG-792
*/
/**
- * Gets the registry of objects being traversed by the {@code
reflectionToString}
- * methods in the current thread.
+ * Gets the registry of objects being traversed by the {@code
reflectionToString} methods in the current thread.
*
- * @return Set the registry of objects being traversed
+ * @return Set the registry of objects being traversed.
*/
public static Map<Object, Object> getRegistry() {
return REGISTRY.get();
}
/**
- * Tests whether the registry contains the given object.
- * Used by the reflection methods to avoid infinite loops.
+ * Tests whether the registry contains the given object. Used by the
reflection methods to avoid infinite loops.
*
- * @param value
- * The object to lookup in the registry.
- * @return boolean {@code true} if the registry contains the given
- * object.
+ * @param value The object to lookup in the registry.
+ * @return boolean {@code true} if the registry contains the given object.
*/
static boolean isRegistered(final Object value) {
return getRegistry().containsKey(value);
}
/**
- * Registers the given object. Used by the reflection methods to avoid
- * infinite loops.
+ * Registers the given object. Used by the reflection methods to avoid
infinite loops.
*
- * @param value
- * The object to register.
+ * @param value The object to register.
*/
static void register(final Object value) {
if (value != null) {
@@ -655,8 +616,7 @@ static void register(final Object value) {
* Used by the reflection methods to avoid infinite loops.
* </p>
*
- * @param value
- * The object to unregister.
+ * @param value The object to unregister.
*/
static void unregister(final Object value) {
if (value != null) {
@@ -672,98 +632,78 @@ static void unregister(final Object value) {
* Whether to use the field names, the default is {@code true}.
*/
private boolean useFieldNames = true;
-
/**
* Whether to use the class name, the default is {@code true}.
*/
private boolean useClassName = true;
-
/**
* Whether to use short class names, the default is {@code false}.
*/
private boolean useShortClassName;
-
/**
* Whether to use the identity hash code, the default is {@code true}.
*/
private boolean useIdentityHashCode = true;
-
/**
* The content start {@code '['}.
*/
private String contentStart = "[";
-
/**
* The content end {@code ']'}.
*/
private String contentEnd = "]";
-
/**
* The field name value separator {@code '='}.
*/
private String fieldNameValueSeparator = "=";
-
/**
* Whether the field separator should be added before any other fields.
*/
private boolean fieldSeparatorAtStart;
-
/**
* Whether the field separator should be added after any other fields.
*/
private boolean fieldSeparatorAtEnd;
-
/**
* The field separator {@code ','}.
*/
private String fieldSeparator = ",";
-
/**
* The array start <code>'{'</code>.
*/
private String arrayStart = "{";
-
/**
* The array separator {@code ','}.
*/
private String arraySeparator = ",";
-
/**
* The detail for array content.
*/
private boolean arrayContentDetail = true;
-
/**
* The array end {@code '}'}.
*/
private String arrayEnd = "}";
-
/**
- * The value to use when fullDetail is {@code null},
- * the default value is {@code true}.
+ * The value to use when fullDetail is {@code null}, the default value is
{@code true}.
*/
private boolean defaultFullDetail = true;
-
/**
* The {@code null} text {@code "<null>"}.
*/
private String nullText = "<null>";
-
/**
* The summary size text start {@code "<size="}.
*/
private String sizeStartText = "<size=";
-
/**
* The summary size text start {@code ">"}.
*/
private String sizeEndText = ">";
-
/**
* The summary object text start {@code "<"}.
*/
private String summaryObjectStartText = "<";
-
/**
* The summary object text start {@code ">"}.
*/
@@ -776,12 +716,11 @@ protected ToStringStyle() {
}
/**
- * Appends to the {@code toString} a {@code boolean}
- * value.
+ * Appends to the {@code toString} a {@code boolean} value.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name
- * @param value the value to add to the {@code toString}
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name.
+ * @param value the value to add to the {@code toString}.
*/
public void append(final StringBuffer buffer, final String fieldName,
final boolean value) {
appendFieldStart(buffer, fieldName);
@@ -790,38 +729,31 @@ public void append(final StringBuffer buffer, final
String fieldName, final bool
}
/**
- * Appends to the {@code toString} a {@code boolean}
- * array.
+ * Appends to the {@code toString} a {@code boolean} array.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name
- * @param array the array to add to the toString
- * @param fullDetail {@code true} for detail, {@code false}
- * for summary info, {@code null} for style decides
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name.
+ * @param array the array to add to the toString.
+ * @param fullDetail {@code true} for detail, {@code false} for summary
info, {@code null} for style decides.
*/
public void append(final StringBuffer buffer, final String fieldName,
final boolean[] array, final Boolean fullDetail) {
appendFieldStart(buffer, fieldName);
-
if (array == null) {
appendNullText(buffer, fieldName);
-
} else if (isFullDetail(fullDetail)) {
appendDetail(buffer, fieldName, array);
-
} else {
appendSummary(buffer, fieldName, array);
}
-
appendFieldEnd(buffer, fieldName);
}
/**
- * Appends to the {@code toString} a {@code byte}
- * value.
+ * Appends to the {@code toString} a {@code byte} value.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name
- * @param value the value to add to the {@code toString}
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name.
+ * @param value the value to add to the {@code toString}.
*/
public void append(final StringBuffer buffer, final String fieldName,
final byte value) {
appendFieldStart(buffer, fieldName);
@@ -830,38 +762,31 @@ public void append(final StringBuffer buffer, final
String fieldName, final byte
}
/**
- * Appends to the {@code toString} a {@code byte}
- * array.
+ * Appends to the {@code toString} a {@code byte} array.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name
- * @param array the array to add to the {@code toString}
- * @param fullDetail {@code true} for detail, {@code false}
- * for summary info, {@code null} for style decides
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name.
+ * @param array the array to add to the {@code toString}.
+ * @param fullDetail {@code true} for detail, {@code false} for summary
info, {@code null} for style decides.
*/
public void append(final StringBuffer buffer, final String fieldName,
final byte[] array, final Boolean fullDetail) {
appendFieldStart(buffer, fieldName);
-
if (array == null) {
appendNullText(buffer, fieldName);
-
} else if (isFullDetail(fullDetail)) {
appendDetail(buffer, fieldName, array);
-
} else {
appendSummary(buffer, fieldName, array);
}
-
appendFieldEnd(buffer, fieldName);
}
/**
- * Appends to the {@code toString} a {@code char}
- * value.
+ * Appends to the {@code toString} a {@code char} value.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name
- * @param value the value to add to the {@code toString}
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name.
+ * @param value the value to add to the {@code toString}.
*/
public void append(final StringBuffer buffer, final String fieldName,
final char value) {
appendFieldStart(buffer, fieldName);
@@ -870,38 +795,31 @@ public void append(final StringBuffer buffer, final
String fieldName, final char
}
/**
- * Appends to the {@code toString} a {@code char}
- * array.
+ * Appends to the {@code toString} a {@code char} array.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name
- * @param array the array to add to the {@code toString}
- * @param fullDetail {@code true} for detail, {@code false}
- * for summary info, {@code null} for style decides
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name.
+ * @param array the array to add to the {@code toString}.
+ * @param fullDetail {@code true} for detail, {@code false} for summary
info, {@code null} for style decides.
*/
public void append(final StringBuffer buffer, final String fieldName,
final char[] array, final Boolean fullDetail) {
appendFieldStart(buffer, fieldName);
-
if (array == null) {
appendNullText(buffer, fieldName);
-
} else if (isFullDetail(fullDetail)) {
appendDetail(buffer, fieldName, array);
-
} else {
appendSummary(buffer, fieldName, array);
}
-
appendFieldEnd(buffer, fieldName);
}
/**
- * Appends to the {@code toString} a {@code double}
- * value.
+ * Appends to the {@code toString} a {@code double} value.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name
- * @param value the value to add to the {@code toString}
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name.
+ * @param value the value to add to the {@code toString}.
*/
public void append(final StringBuffer buffer, final String fieldName,
final double value) {
appendFieldStart(buffer, fieldName);
@@ -910,38 +828,31 @@ public void append(final StringBuffer buffer, final
String fieldName, final doub
}
/**
- * Appends to the {@code toString} a {@code double}
- * array.
+ * Appends to the {@code toString} a {@code double} array.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name
- * @param array the array to add to the toString
- * @param fullDetail {@code true} for detail, {@code false}
- * for summary info, {@code null} for style decides
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name.
+ * @param array the array to add to the toString.
+ * @param fullDetail {@code true} for detail, {@code false} for summary
info, {@code null} for style decides.
*/
public void append(final StringBuffer buffer, final String fieldName,
final double[] array, final Boolean fullDetail) {
appendFieldStart(buffer, fieldName);
-
if (array == null) {
appendNullText(buffer, fieldName);
-
} else if (isFullDetail(fullDetail)) {
appendDetail(buffer, fieldName, array);
-
} else {
appendSummary(buffer, fieldName, array);
}
-
appendFieldEnd(buffer, fieldName);
}
/**
- * Appends to the {@code toString} a {@code float}
- * value.
+ * Appends to the {@code toString} a {@code float} value.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name
- * @param value the value to add to the {@code toString}
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name.
+ * @param value the value to add to the {@code toString}.
*/
public void append(final StringBuffer buffer, final String fieldName,
final float value) {
appendFieldStart(buffer, fieldName);
@@ -950,38 +861,31 @@ public void append(final StringBuffer buffer, final
String fieldName, final floa
}
/**
- * Appends to the {@code toString} a {@code float}
- * array.
+ * Appends to the {@code toString} a {@code float} array.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name
- * @param array the array to add to the toString
- * @param fullDetail {@code true} for detail, {@code false}
- * for summary info, {@code null} for style decides
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name.
+ * @param array the array to add to the toString.
+ * @param fullDetail {@code true} for detail, {@code false} for summary
info, {@code null} for style decides.
*/
public void append(final StringBuffer buffer, final String fieldName,
final float[] array, final Boolean fullDetail) {
appendFieldStart(buffer, fieldName);
-
if (array == null) {
appendNullText(buffer, fieldName);
-
} else if (isFullDetail(fullDetail)) {
appendDetail(buffer, fieldName, array);
-
} else {
appendSummary(buffer, fieldName, array);
}
-
appendFieldEnd(buffer, fieldName);
}
/**
- * Appends to the {@code toString} an {@code int}
- * value.
+ * Appends to the {@code toString} an {@code int} value.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name
- * @param value the value to add to the {@code toString}
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name.
+ * @param value the value to add to the {@code toString}.
*/
public void append(final StringBuffer buffer, final String fieldName,
final int value) {
appendFieldStart(buffer, fieldName);
@@ -990,38 +894,31 @@ public void append(final StringBuffer buffer, final
String fieldName, final int
}
/**
- * Appends to the {@code toString} an {@code int}
- * array.
+ * Appends to the {@code toString} an {@code int} array.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name
- * @param array the array to add to the {@code toString}
- * @param fullDetail {@code true} for detail, {@code false}
- * for summary info, {@code null} for style decides
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name.
+ * @param array the array to add to the {@code toString}.
+ * @param fullDetail {@code true} for detail, {@code false} for summary
info, {@code null} for style decides.
*/
public void append(final StringBuffer buffer, final String fieldName,
final int[] array, final Boolean fullDetail) {
appendFieldStart(buffer, fieldName);
-
if (array == null) {
appendNullText(buffer, fieldName);
-
} else if (isFullDetail(fullDetail)) {
appendDetail(buffer, fieldName, array);
-
} else {
appendSummary(buffer, fieldName, array);
}
-
appendFieldEnd(buffer, fieldName);
}
/**
- * <p>Appends to the {@code toString} a {@code long}
- * value.
+ * Appends to the {@code toString} a {@code long} value.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name
- * @param value the value to add to the {@code toString}
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name.
+ * @param value the value to add to the {@code toString}.
*/
public void append(final StringBuffer buffer, final String fieldName,
final long value) {
appendFieldStart(buffer, fieldName);
@@ -1030,88 +927,69 @@ public void append(final StringBuffer buffer, final
String fieldName, final long
}
/**
- * Appends to the {@code toString} a {@code long}
- * array.
+ * Appends to the {@code toString} a {@code long} array.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name
- * @param array the array to add to the {@code toString}
- * @param fullDetail {@code true} for detail, {@code false}
- * for summary info, {@code null} for style decides
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name.
+ * @param array the array to add to the {@code toString}.
+ * @param fullDetail {@code true} for detail, {@code false} for summary
info, {@code null} for style decides.
*/
public void append(final StringBuffer buffer, final String fieldName,
final long[] array, final Boolean fullDetail) {
appendFieldStart(buffer, fieldName);
-
if (array == null) {
appendNullText(buffer, fieldName);
-
} else if (isFullDetail(fullDetail)) {
appendDetail(buffer, fieldName, array);
-
} else {
appendSummary(buffer, fieldName, array);
}
-
appendFieldEnd(buffer, fieldName);
}
/**
- * Appends to the {@code toString} an {@link Object}
- * value, printing the full {@code toString} of the
- * {@link Object} passed in.
+ * Appends to the {@code toString} an {@link Object} value, printing the
full {@code toString} of the {@link Object} passed in.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name
- * @param value the value to add to the {@code toString}
- * @param fullDetail {@code true} for detail, {@code false}
- * for summary info, {@code null} for style decides
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name.
+ * @param value the value to add to the {@code toString}.
+ * @param fullDetail {@code true} for detail, {@code false} for summary
info, {@code null} for style decides.
*/
public void append(final StringBuffer buffer, final String fieldName,
final Object value, final Boolean fullDetail) {
appendFieldStart(buffer, fieldName);
-
if (value == null) {
appendNullText(buffer, fieldName);
-
} else {
appendInternal(buffer, fieldName, value, isFullDetail(fullDetail));
}
-
appendFieldEnd(buffer, fieldName);
}
/**
- * Appends to the {@code toString} an {@link Object}
- * array.
+ * Appends to the {@code toString} an {@link Object} array.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name
- * @param array the array to add to the toString
- * @param fullDetail {@code true} for detail, {@code false}
- * for summary info, {@code null} for style decides
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name.
+ * @param array the array to add to the toString.
+ * @param fullDetail {@code true} for detail, {@code false} for summary
info, {@code null} for style decides.
*/
public void append(final StringBuffer buffer, final String fieldName,
final Object[] array, final Boolean fullDetail) {
appendFieldStart(buffer, fieldName);
-
if (array == null) {
appendNullText(buffer, fieldName);
-
} else if (isFullDetail(fullDetail)) {
appendDetail(buffer, fieldName, array);
-
} else {
appendSummary(buffer, fieldName, array);
}
-
appendFieldEnd(buffer, fieldName);
}
/**
- * Appends to the {@code toString} a {@code short}
- * value.
+ * Appends to the {@code toString} a {@code short} value.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name
- * @param value the value to add to the {@code toString}
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name.
+ * @param value the value to add to the {@code toString}.
*/
public void append(final StringBuffer buffer, final String fieldName,
final short value) {
appendFieldStart(buffer, fieldName);
@@ -1120,36 +998,30 @@ public void append(final StringBuffer buffer, final
String fieldName, final shor
}
/**
- * Appends to the {@code toString} a {@code short}
- * array.
+ * Appends to the {@code toString} a {@code short} array.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name
- * @param array the array to add to the {@code toString}
- * @param fullDetail {@code true} for detail, {@code false}
- * for summary info, {@code null} for style decides
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name.
+ * @param array the array to add to the {@code toString}.
+ * @param fullDetail {@code true} for detail, {@code false} for summary
info, {@code null} for style decides.
*/
public void append(final StringBuffer buffer, final String fieldName,
final short[] array, final Boolean fullDetail) {
appendFieldStart(buffer, fieldName);
-
if (array == null) {
appendNullText(buffer, fieldName);
-
} else if (isFullDetail(fullDetail)) {
appendDetail(buffer, fieldName, array);
-
} else {
appendSummary(buffer, fieldName, array);
}
-
appendFieldEnd(buffer, fieldName);
}
/**
* Appends to the {@code toString} the class name.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param object the {@link Object} whose name to output
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param object the {@link Object} whose name to output.
*/
protected void appendClassName(final StringBuffer buffer, final Object
object) {
if (isUseClassName() && object != null) {
@@ -1165,7 +1037,7 @@ protected void appendClassName(final StringBuffer buffer,
final Object object) {
/**
* Appends to the {@code toString} the content end.
*
- * @param buffer the {@link StringBuffer} to populate
+ * @param buffer the {@link StringBuffer} to populate.
*/
protected void appendContentEnd(final StringBuffer buffer) {
buffer.append(getContentEnd());
@@ -1174,48 +1046,42 @@ protected void appendContentEnd(final StringBuffer
buffer) {
/**
* Appends to the {@code toString} the content start.
*
- * @param buffer the {@link StringBuffer} to populate
+ * @param buffer the {@link StringBuffer} to populate.
*/
protected void appendContentStart(final StringBuffer buffer) {
buffer.append(getContentStart());
}
/**
- * Appends to the {@code toString} an {@link Object}
- * value that has been detected to participate in a cycle. This
- * implementation will print the standard string value of the value.
- *
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name, typically not used as already appended
- * @param value the value to add to the {@code toString},
- * not {@code null}
+ * Appends to the {@code toString} an {@link Object} value that has been
detected to participate in a cycle. This implementation will print the standard
+ * string value of the value.
*
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name, typically not used as already appended
+ * @param value the value to add to the {@code toString}, not {@code
null}.
* @since 2.2
*/
protected void appendCyclicObject(final StringBuffer buffer, final String
fieldName, final Object value) {
- ObjectUtils.identityToString(buffer, value);
+ ObjectUtils.identityToString(buffer, value);
}
/**
- * Appends to the {@code toString} a {@code boolean}
- * value.
+ * Appends to the {@code toString} a {@code boolean} value.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name, typically not used as already appended
- * @param value the value to add to the {@code toString}
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name, typically not used as already appended.
+ * @param value the value to add to the {@code toString}.
*/
protected void appendDetail(final StringBuffer buffer, final String
fieldName, final boolean value) {
buffer.append(value);
}
/**
- * Appends to the {@code toString} the detail of a
- * {@code boolean} array.
+ * Appends to the {@code toString} the detail of a {@code boolean} array.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name, typically not used as already appended
- * @param array the array to add to the {@code toString},
- * not {@code null}
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name, typically not used as already appended.
+ * @param array the array to add to the {@code toString}, not {@code
null}.
*/
protected void appendDetail(final StringBuffer buffer, final String
fieldName, final boolean[] array) {
buffer.append(getArrayStart());
@@ -1229,25 +1095,22 @@ protected void appendDetail(final StringBuffer buffer,
final String fieldName, f
}
/**
- * Appends to the {@code toString} a {@code byte}
- * value.
+ * Appends to the {@code toString} a {@code byte} value.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name, typically not used as already appended
- * @param value the value to add to the {@code toString}
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name, typically not used as already appended.
+ * @param value the value to add to the {@code toString}.
*/
protected void appendDetail(final StringBuffer buffer, final String
fieldName, final byte value) {
buffer.append(value);
}
/**
- * Appends to the {@code toString} the detail of a
- * {@code byte} array.
+ * Appends to the {@code toString} the detail of a {@code byte} array.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name, typically not used as already appended
- * @param array the array to add to the {@code toString},
- * not {@code null}
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name, typically not used as already appended.
+ * @param array the array to add to the {@code toString}, not {@code
null}.
*/
protected void appendDetail(final StringBuffer buffer, final String
fieldName, final byte[] array) {
buffer.append(getArrayStart());
@@ -1261,25 +1124,22 @@ protected void appendDetail(final StringBuffer buffer,
final String fieldName, f
}
/**
- * Appends to the {@code toString} a {@code char}
- * value.
+ * Appends to the {@code toString} a {@code char} value.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name, typically not used as already appended
- * @param value the value to add to the {@code toString}
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name, typically not used as already appended.
+ * @param value the value to add to the {@code toString}.
*/
protected void appendDetail(final StringBuffer buffer, final String
fieldName, final char value) {
buffer.append(value);
}
/**
- * Appends to the {@code toString} the detail of a
- * {@code char} array.
+ * Appends to the {@code toString} the detail of a {@code char} array.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name, typically not used as already appended
- * @param array the array to add to the {@code toString},
- * not {@code null}
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name, typically not used as already appended.
+ * @param array the array to add to the {@code toString}, not {@code
null}.
*/
protected void appendDetail(final StringBuffer buffer, final String
fieldName, final char[] array) {
buffer.append(getArrayStart());
@@ -1295,35 +1155,31 @@ protected void appendDetail(final StringBuffer buffer,
final String fieldName, f
/**
* Appends to the {@code toString} a {@link Collection}.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name, typically not used as already appended
- * @param coll the {@link Collection} to add to the
- * {@code toString}, not {@code null}
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name, typically not used as already appended.
+ * @param coll the {@link Collection} to add to the {@code toString},
not {@code null}.
*/
protected void appendDetail(final StringBuffer buffer, final String
fieldName, final Collection<?> coll) {
buffer.append(coll);
}
/**
- * Appends to the {@code toString} a {@code double}
- * value.
+ * Appends to the {@code toString} a {@code double} value.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name, typically not used as already appended
- * @param value the value to add to the {@code toString}
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name, typically not used as already appended.
+ * @param value the value to add to the {@code toString}.
*/
protected void appendDetail(final StringBuffer buffer, final String
fieldName, final double value) {
buffer.append(value);
}
/**
- * Appends to the {@code toString} the detail of a
- * {@code double} array.
+ * Appends to the {@code toString} the detail of a {@code double} array.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name, typically not used as already appended
- * @param array the array to add to the {@code toString},
- * not {@code null}
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name, typically not used as already appended
+ * @param array the array to add to the {@code toString}, not {@code
null}.
*/
protected void appendDetail(final StringBuffer buffer, final String
fieldName, final double[] array) {
buffer.append(getArrayStart());
@@ -1337,25 +1193,22 @@ protected void appendDetail(final StringBuffer buffer,
final String fieldName, f
}
/**
- * Appends to the {@code toString} a {@code float}
- * value.
+ * Appends to the {@code toString} a {@code float} value.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name, typically not used as already appended
- * @param value the value to add to the {@code toString}
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name, typically not used as already appended.
+ * @param value the value to add to the {@code toString}.
*/
protected void appendDetail(final StringBuffer buffer, final String
fieldName, final float value) {
buffer.append(value);
}
/**
- * Appends to the {@code toString} the detail of a
- * {@code float} array.
+ * Appends to the {@code toString} the detail of a {@code float} array.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name, typically not used as already appended
- * @param array the array to add to the {@code toString},
- * not {@code null}
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name, typically not used as already appended.
+ * @param array the array to add to the {@code toString}, not {@code
null}.
*/
protected void appendDetail(final StringBuffer buffer, final String
fieldName, final float[] array) {
buffer.append(getArrayStart());
@@ -1369,25 +1222,23 @@ protected void appendDetail(final StringBuffer buffer,
final String fieldName, f
}
/**
- * Appends to the {@code toString} an {@code int}
- * value.
+ * Appends to the {@code toString} an {@code int} value.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name, typically not used as already appended
- * @param value the value to add to the {@code toString}
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name, typically not used as already appended.
+ * @param value the value to add to the {@code toString}.
*/
protected void appendDetail(final StringBuffer buffer, final String
fieldName, final int value) {
buffer.append(value);
}
/**
- * Appends to the {@code toString} the detail of an
- * {@link Object} array item.
+ * Appends to the {@code toString} the detail of an {@link Object} array
item.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name, typically not used as already appended
- * @param i the array item index to add
- * @param item the array item to add
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name, typically not used as already appended.
+ * @param i the array item index to add.
+ * @param item the array item to add.
* @since 3.11
*/
protected void appendDetail(final StringBuffer buffer, final String
fieldName, final int i, final Object item) {
@@ -1402,13 +1253,11 @@ protected void appendDetail(final StringBuffer buffer,
final String fieldName, f
}
/**
- * Appends to the {@code toString} the detail of an
- * {@code int} array.
+ * Appends to the {@code toString} the detail of an {@code int} array.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name, typically not used as already appended
- * @param array the array to add to the {@code toString},
- * not {@code null}
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name, typically not used as already appended.
+ * @param array the array to add to the {@code toString}, not {@code
null}.
*/
protected void appendDetail(final StringBuffer buffer, final String
fieldName, final int[] array) {
buffer.append(getArrayStart());
@@ -1422,25 +1271,22 @@ protected void appendDetail(final StringBuffer buffer,
final String fieldName, f
}
/**
- * Appends to the {@code toString} a {@code long}
- * value.
+ * Appends to the {@code toString} a {@code long} value.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name, typically not used as already appended
- * @param value the value to add to the {@code toString}
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name, typically not used as already appended.
+ * @param value the value to add to the {@code toString}.
*/
protected void appendDetail(final StringBuffer buffer, final String
fieldName, final long value) {
buffer.append(value);
}
/**
- * Appends to the {@code toString} the detail of a
- * {@code long} array.
+ * Appends to the {@code toString} the detail of a {@code long} array.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name, typically not used as already appended
- * @param array the array to add to the {@code toString},
- * not {@code null}
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name, typically not used as already appended.
+ * @param array the array to add to the {@code toString}, not {@code
null}.
*/
protected void appendDetail(final StringBuffer buffer, final String
fieldName, final long[] array) {
buffer.append(getArrayStart());
@@ -1456,36 +1302,31 @@ protected void appendDetail(final StringBuffer buffer,
final String fieldName, f
/**
* Appends to the {@code toString} a {@link Map}.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name, typically not used as already appended
- * @param map the {@link Map} to add to the {@code toString},
- * not {@code null}
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name, typically not used as already appended.
+ * @param map the {@link Map} to add to the {@code toString}, not
{@code null}.
*/
protected void appendDetail(final StringBuffer buffer, final String
fieldName, final Map<?, ?> map) {
buffer.append(map);
}
/**
- * Appends to the {@code toString} an {@link Object}
- * value, printing the full detail of the {@link Object}.
+ * Appends to the {@code toString} an {@link Object} value, printing the
full detail of the {@link Object}.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name, typically not used as already appended
- * @param value the value to add to the {@code toString},
- * not {@code null}
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name, typically not used as already appended.
+ * @param value the value to add to the {@code toString}, not {@code
null}.
*/
protected void appendDetail(final StringBuffer buffer, final String
fieldName, final Object value) {
buffer.append(value);
}
/**
- * Appends to the {@code toString} the detail of an
- * {@link Object} array.
+ * Appends to the {@code toString} the detail of an {@link Object} array.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name, typically not used as already appended
- * @param array the array to add to the {@code toString},
- * not {@code null}
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name, typically not used as already appended.
+ * @param array the array to add to the {@code toString}, not {@code
null}.
*/
protected void appendDetail(final StringBuffer buffer, final String
fieldName, final Object[] array) {
buffer.append(getArrayStart());
@@ -1496,25 +1337,22 @@ protected void appendDetail(final StringBuffer buffer,
final String fieldName, f
}
/**
- * Appends to the {@code toString} a {@code short}
- * value.
+ * Appends to the {@code toString} a {@code short} value.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name, typically not used as already appended
- * @param value the value to add to the {@code toString}
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name, typically not used as already appended.
+ * @param value the value to add to the {@code toString}.
*/
protected void appendDetail(final StringBuffer buffer, final String
fieldName, final short value) {
buffer.append(value);
}
/**
- * Appends to the {@code toString} the detail of a
- * {@code short} array.
+ * Appends to the {@code toString} the detail of a {@code short} array.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name, typically not used as already appended
- * @param array the array to add to the {@code toString},
- * not {@code null}
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name, typically not used as already appended.
+ * @param array the array to add to the {@code toString}, not {@code
null}.
*/
protected void appendDetail(final StringBuffer buffer, final String
fieldName, final short[] array) {
buffer.append(getArrayStart());
@@ -1530,9 +1368,8 @@ protected void appendDetail(final StringBuffer buffer,
final String fieldName, f
/**
* Appends to the {@code toString} the end of data indicator.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param object the {@link Object} to build a
- * {@code toString} for.
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param object the {@link Object} to build a {@code toString} for.
*/
public void appendEnd(final StringBuffer buffer, final Object object) {
if (!isFieldSeparatorAtEnd()) {
@@ -1545,8 +1382,8 @@ public void appendEnd(final StringBuffer buffer, final
Object object) {
/**
* Appends to the {@code toString} the field end.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name, typically not used as already appended
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name, typically not used as already appended.
*/
protected void appendFieldEnd(final StringBuffer buffer, final String
fieldName) {
appendFieldSeparator(buffer);
@@ -1555,7 +1392,7 @@ protected void appendFieldEnd(final StringBuffer buffer,
final String fieldName)
/**
* Appends to the {@code toString} the field separator.
*
- * @param buffer the {@link StringBuffer} to populate
+ * @param buffer the {@link StringBuffer} to populate.
*/
protected void appendFieldSeparator(final StringBuffer buffer) {
buffer.append(getFieldSeparator());
@@ -1564,8 +1401,8 @@ protected void appendFieldSeparator(final StringBuffer
buffer) {
/**
* Appends to the {@code toString} the field start.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name.
*/
protected void appendFieldStart(final StringBuffer buffer, final String
fieldName) {
if (isUseFieldNames() && fieldName != null) {
@@ -1577,8 +1414,8 @@ protected void appendFieldStart(final StringBuffer
buffer, final String fieldNam
/**
* Appends the {@link System#identityHashCode(java.lang.Object)}.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param object the {@link Object} whose id to output
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param object the {@link Object} whose id to output.
*/
protected void appendIdentityHashCode(final StringBuffer buffer, final
Object object) {
if (isUseIdentityHashCode() && object != null) {
@@ -1589,33 +1426,32 @@ protected void appendIdentityHashCode(final
StringBuffer buffer, final Object ob
}
/**
- * Appends to the {@code toString} an {@link Object},
- * correctly interpreting its type.
+ * Appends to the {@code toString} an {@link Object}, correctly
interpreting its type.
*
- * <p>This method performs the main lookup by Class type to correctly
- * route arrays, {@link Collection}s, {@link Map}s and
- * {@link Objects} to the appropriate method.</p>
+ * <p>
+ * This method performs the main lookup by Class type to correctly route
arrays, {@link Collection}s, {@link Map}s and {@link Objects} to the appropriate
+ * method.
+ * </p>
*
- * <p>Either detail or summary views can be specified.</p>
+ * <p>
+ * Either detail or summary views can be specified.
+ * </p>
*
- * <p>If a cycle is detected, an object will be appended with the
- * {@code Object.toString()} format.</p>
+ * <p>
+ * If a cycle is detected, an object will be appended with the {@code
Object.toString()} format.
+ * </p>
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name, typically not used as already appended
- * @param value the value to add to the {@code toString},
- * not {@code null}
- * @param detail output detail or not
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name, typically not used as already appended.
+ * @param value the value to add to the {@code toString}, not {@code
null}.
+ * @param detail output detail or not.
*/
protected void appendInternal(final StringBuffer buffer, final String
fieldName, final Object value, final boolean detail) {
- if (isRegistered(value)
- && !(value instanceof Number || value instanceof Boolean || value
instanceof Character)) {
- appendCyclicObject(buffer, fieldName, value);
- return;
+ if (isRegistered(value) && !(value instanceof Number || value
instanceof Boolean || value instanceof Character)) {
+ appendCyclicObject(buffer, fieldName, value);
+ return;
}
-
register(value);
-
try {
if (value instanceof Collection<?>) {
if (detail) {
@@ -1623,77 +1459,66 @@ protected void appendInternal(final StringBuffer
buffer, final String fieldName,
} else {
appendSummarySize(buffer, fieldName, ((Collection<?>)
value).size());
}
-
} else if (value instanceof Map<?, ?>) {
if (detail) {
appendDetail(buffer, fieldName, (Map<?, ?>) value);
} else {
appendSummarySize(buffer, fieldName, ((Map<?, ?>)
value).size());
}
-
} else if (value instanceof long[]) {
if (detail) {
appendDetail(buffer, fieldName, (long[]) value);
} else {
appendSummary(buffer, fieldName, (long[]) value);
}
-
} else if (value instanceof int[]) {
if (detail) {
appendDetail(buffer, fieldName, (int[]) value);
} else {
appendSummary(buffer, fieldName, (int[]) value);
}
-
} else if (value instanceof short[]) {
if (detail) {
appendDetail(buffer, fieldName, (short[]) value);
} else {
appendSummary(buffer, fieldName, (short[]) value);
}
-
} else if (value instanceof byte[]) {
if (detail) {
appendDetail(buffer, fieldName, (byte[]) value);
} else {
appendSummary(buffer, fieldName, (byte[]) value);
}
-
} else if (value instanceof char[]) {
if (detail) {
appendDetail(buffer, fieldName, (char[]) value);
} else {
appendSummary(buffer, fieldName, (char[]) value);
}
-
} else if (value instanceof double[]) {
if (detail) {
appendDetail(buffer, fieldName, (double[]) value);
} else {
appendSummary(buffer, fieldName, (double[]) value);
}
-
} else if (value instanceof float[]) {
if (detail) {
appendDetail(buffer, fieldName, (float[]) value);
} else {
appendSummary(buffer, fieldName, (float[]) value);
}
-
} else if (value instanceof boolean[]) {
if (detail) {
appendDetail(buffer, fieldName, (boolean[]) value);
} else {
appendSummary(buffer, fieldName, (boolean[]) value);
}
-
} else if (ObjectUtils.isArray(value)) {
if (detail) {
appendDetail(buffer, fieldName, (Object[]) value);
} else {
appendSummary(buffer, fieldName, (Object[]) value);
}
-
} else if (detail) {
appendDetail(buffer, fieldName, value);
} else {
@@ -1707,10 +1532,12 @@ protected void appendInternal(final StringBuffer
buffer, final String fieldName,
/**
* Appends to the {@code toString} an indicator for {@code null}.
*
- * <p>The default indicator is {@code "<null>"}.</p>
+ * <p>
+ * The default indicator is {@code "<null>"}.
+ * </p>
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name, typically not used as already appended
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name, typically not used as already appended.
*/
protected void appendNullText(final StringBuffer buffer, final String
fieldName) {
buffer.append(getNullText());
@@ -1719,8 +1546,8 @@ protected void appendNullText(final StringBuffer buffer,
final String fieldName)
/**
* Appends to the {@code toString} the start of data indicator.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param object the {@link Object} to build a {@code toString} for
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param object the {@link Object} to build a {@code toString} for.
*/
public void appendStart(final StringBuffer buffer, final Object object) {
if (object != null) {
@@ -1734,104 +1561,88 @@ public void appendStart(final StringBuffer buffer,
final Object object) {
}
/**
- * Appends to the {@code toString} a summary of a
- * {@code boolean} array.
+ * Appends to the {@code toString} a summary of a {@code boolean} array.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name, typically not used as already appended
- * @param array the array to add to the {@code toString},
- * not {@code null}
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name, typically not used as already appended.
+ * @param array the array to add to the {@code toString}, not {@code
null}.
*/
protected void appendSummary(final StringBuffer buffer, final String
fieldName, final boolean[] array) {
appendSummarySize(buffer, fieldName, array.length);
}
/**
- * Appends to the {@code toString} a summary of a
- * {@code byte} array.
+ * Appends to the {@code toString} a summary of a {@code byte} array.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name, typically not used as already appended
- * @param array the array to add to the {@code toString},
- * not {@code null}
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name, typically not used as already appended.
+ * @param array the array to add to the {@code toString}, not {@code
null}.
*/
protected void appendSummary(final StringBuffer buffer, final String
fieldName, final byte[] array) {
appendSummarySize(buffer, fieldName, array.length);
}
/**
- * Appends to the {@code toString} a summary of a
- * {@code char} array.
+ * Appends to the {@code toString} a summary of a {@code char} array.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name, typically not used as already appended
- * @param array the array to add to the {@code toString},
- * not {@code null}
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name, typically not used as already appended.
+ * @param array the array to add to the {@code toString}, not {@code
null}.
*/
protected void appendSummary(final StringBuffer buffer, final String
fieldName, final char[] array) {
appendSummarySize(buffer, fieldName, array.length);
}
/**
- * Appends to the {@code toString} a summary of a
- * {@code double} array.
+ * Appends to the {@code toString} a summary of a {@code double} array.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name, typically not used as already appended
- * @param array the array to add to the {@code toString},
- * not {@code null}
+ * @param buffer the {@link StringBuffer} to populate
+ * @param fieldName the field name, typically not used as already appended
+ * @param array the array to add to the {@code toString}, not {@code
null}
*/
protected void appendSummary(final StringBuffer buffer, final String
fieldName, final double[] array) {
appendSummarySize(buffer, fieldName, array.length);
}
/**
- * Appends to the {@code toString} a summary of a
- * {@code float} array.
+ * Appends to the {@code toString} a summary of a {@code float} array.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name, typically not used as already appended
- * @param array the array to add to the {@code toString},
- * not {@code null}
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name, typically not used as already appended.
+ * @param array the array to add to the {@code toString}, not {@code
null}.
*/
protected void appendSummary(final StringBuffer buffer, final String
fieldName, final float[] array) {
appendSummarySize(buffer, fieldName, array.length);
}
/**
- * Appends to the {@code toString} a summary of an
- * {@code int} array.
+ * Appends to the {@code toString} a summary of an {@code int} array.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name, typically not used as already appended
- * @param array the array to add to the {@code toString},
- * not {@code null}
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name, typically not used as already appended.
+ * @param array the array to add to the {@code toString}, not {@code
null}.
*/
protected void appendSummary(final StringBuffer buffer, final String
fieldName, final int[] array) {
appendSummarySize(buffer, fieldName, array.length);
}
/**
- * Appends to the {@code toString} a summary of a
- * {@code long} array.
+ * Appends to the {@code toString} a summary of a {@code long} array.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name, typically not used as already appended
- * @param array the array to add to the {@code toString},
- * not {@code null}
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name, typically not used as already appended.
+ * @param array the array to add to the {@code toString}, not {@code
null}.
*/
protected void appendSummary(final StringBuffer buffer, final String
fieldName, final long[] array) {
appendSummarySize(buffer, fieldName, array.length);
}
/**
- * Appends to the {@code toString} an {@link Object}
- * value, printing a summary of the {@link Object}.
+ * Appends to the {@code toString} an {@link Object} value, printing a
summary of the {@link Object}.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name, typically not used as already appended
- * @param value the value to add to the {@code toString},
- * not {@code null}
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name, typically not used as already appended.
+ * @param value the value to add to the {@code toString}, not {@code
null}.
*/
protected void appendSummary(final StringBuffer buffer, final String
fieldName, final Object value) {
buffer.append(getSummaryObjectStartText());
@@ -1840,26 +1651,22 @@ protected void appendSummary(final StringBuffer buffer,
final String fieldName,
}
/**
- * Appends to the {@code toString} a summary of an
- * {@link Object} array.
+ * Appends to the {@code toString} a summary of an {@link Object} array.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name, typically not used as already appended
- * @param array the array to add to the {@code toString},
- * not {@code null}
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name, typically not used as already appended.
+ * @param array the array to add to the {@code toString}, not {@code
null}.
*/
protected void appendSummary(final StringBuffer buffer, final String
fieldName, final Object[] array) {
appendSummarySize(buffer, fieldName, array.length);
}
/**
- * Appends to the {@code toString} a summary of a
- * {@code short} array.
+ * Appends to the {@code toString} a summary of a {@code short} array.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name, typically not used as already appended
- * @param array the array to add to the {@code toString},
- * not {@code null}
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name, typically not used as already appended.
+ * @param array the array to add to the {@code toString}, not {@code
null}.
*/
protected void appendSummary(final StringBuffer buffer, final String
fieldName, final short[] array) {
appendSummarySize(buffer, fieldName, array.length);
@@ -1868,17 +1675,21 @@ protected void appendSummary(final StringBuffer buffer,
final String fieldName,
/**
* Appends to the {@code toString} a size summary.
*
- * <p>The size summary is used to summarize the contents of
- * {@link Collection}s, {@link Map}s and arrays.</p>
+ * <p>
+ * The size summary is used to summarize the contents of {@link
Collection}s, {@link Map}s and arrays.
+ * </p>
*
- * <p>The output consists of a prefix, the passed in size
- * and a suffix.</p>
+ * <p>
+ * The output consists of a prefix, the passed in size and a suffix.
+ * </p>
*
- * <p>The default format is {@code "<size=n>"}.</p>
+ * <p>
+ * The default format is {@code "<size=n>"}.
+ * </p>
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name, typically not used as already appended
- * @param size the size to append
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name, typically not used as already appended.
+ * @param size the size to append.
*/
protected void appendSummarySize(final StringBuffer buffer, final String
fieldName, final int size) {
buffer.append(getSizeStartText());
@@ -1888,12 +1699,16 @@ protected void appendSummarySize(final StringBuffer
buffer, final String fieldNa
/**
* Appends to the {@code toString} the superclass toString.
- * <p>NOTE: It assumes that the toString has been created from the same
ToStringStyle.</p>
+ * <p>
+ * NOTE: It assumes that the toString has been created from the same
ToStringStyle.
+ * </p>
*
- * <p>A {@code null} {@code superToString} is ignored.</p>
+ * <p>
+ * A {@code null} {@code superToString} is ignored.
+ * </p>
*
- * @param buffer the {@link StringBuffer} to populate
- * @param superToString the {@code super.toString()}
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param superToString the {@code super.toString()}.
* @since 2.0
*/
public void appendSuper(final StringBuffer buffer, final String
superToString) {
@@ -1902,12 +1717,16 @@ public void appendSuper(final StringBuffer buffer,
final String superToString) {
/**
* Appends to the {@code toString} another toString.
- * <p>NOTE: It assumes that the toString has been created from the same
ToStringStyle.</p>
+ * <p>
+ * NOTE: It assumes that the toString has been created from the same
ToStringStyle.
+ * </p>
*
- * <p>A {@code null} {@code toString} is ignored.</p>
+ * <p>
+ * A {@code null} {@code toString} is ignored.
+ * </p>
*
- * @param buffer the {@link StringBuffer} to populate
- * @param toString the additional {@code toString}
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param toString the additional {@code toString}.
* @since 2.0
*/
public void appendToString(final StringBuffer buffer, final String
toString) {
@@ -1927,7 +1746,7 @@ public void appendToString(final StringBuffer buffer,
final String toString) {
/**
* Gets the array end text.
*
- * @return the current array end text
+ * @return the current array end text.
*/
protected String getArrayEnd() {
return arrayEnd;
@@ -1936,7 +1755,7 @@ protected String getArrayEnd() {
/**
* Gets the array separator text.
*
- * @return the current array separator text
+ * @return the current array separator text.
*/
protected String getArraySeparator() {
return arraySeparator;
@@ -1945,7 +1764,7 @@ protected String getArraySeparator() {
/**
* Gets the array start text.
*
- * @return the current array start text
+ * @return the current array start text.
*/
protected String getArrayStart() {
return arrayStart;
@@ -1954,7 +1773,7 @@ protected String getArrayStart() {
/**
* Gets the content end text.
*
- * @return the current content end text
+ * @return the current content end text.
*/
protected String getContentEnd() {
return contentEnd;
@@ -1963,7 +1782,7 @@ protected String getContentEnd() {
/**
* Gets the content start text.
*
- * @return the current content start text
+ * @return the current content start text.
*/
protected String getContentStart() {
return contentStart;
@@ -1972,7 +1791,7 @@ protected String getContentStart() {
/**
* Gets the field name value separator text.
*
- * @return the current field name value separator text
+ * @return the current field name value separator text.
*/
protected String getFieldNameValueSeparator() {
return fieldNameValueSeparator;
@@ -1981,7 +1800,7 @@ protected String getFieldNameValueSeparator() {
/**
* Gets the field separator text.
*
- * @return the current field separator text
+ * @return the current field separator text.
*/
protected String getFieldSeparator() {
return fieldSeparator;
@@ -1990,7 +1809,7 @@ protected String getFieldSeparator() {
/**
* Gets the text to output when {@code null} found.
*
- * @return the current text to output when null found
+ * @return the current text to output when null found.
*/
protected String getNullText() {
return nullText;
@@ -1999,59 +1818,64 @@ protected String getNullText() {
/**
* Gets the short class name for a class.
*
- * <p>The short class name is the class name excluding
- * the package name.</p>
+ * <p>
+ * The short class name is the class name excluding the package name.
+ * </p>
*
- * @param cls the {@link Class} to get the short name of
- * @return the short name
+ * @param cls the {@link Class} to get the short name of.
+ * @return the short name.
*/
protected String getShortClassName(final Class<?> cls) {
return ClassUtils.getShortClassName(cls);
}
/**
- * Gets the end text to output when a {@link Collection},
- * {@link Map} or array size is output.
+ * Gets the end text to output when a {@link Collection}, {@link Map} or
array size is output.
*
- * <p>This is output after the size value.</p>
+ * <p>
+ * This is output after the size value.
+ * </p>
*
- * @return the current end of size text
+ * @return the current end of size text.
*/
protected String getSizeEndText() {
return sizeEndText;
}
/**
- * Gets the start text to output when a {@link Collection},
- * {@link Map} or array size is output.
+ * Gets the start text to output when a {@link Collection}, {@link Map} or
array size is output.
*
- * <p>This is output before the size value.</p>
+ * <p>
+ * This is output before the size value.
+ * </p>
*
- * @return the current start of size text
+ * @return the current start of size text.
*/
protected String getSizeStartText() {
return sizeStartText;
}
/**
- * Gets the end text to output when an {@link Object} is
- * output in summary mode.
+ * Gets the end text to output when an {@link Object} is output in summary
mode.
*
- * <p>This is output after the size value.</p>
+ * <p>
+ * This is output after the size value.
+ * </p>
*
- * @return the current end of summary text
+ * @return the current end of summary text.
*/
protected String getSummaryObjectEndText() {
return summaryObjectEndText;
}
/**
- * Gets the start text to output when an {@link Object} is
- * output in summary mode.
+ * Gets the start text to output when an {@link Object} is output in
summary mode.
*
- * <p>This is output before the size value.</p>
+ * <p>
+ * This is output before the size value.
+ * </p>
*
- * @return the current start of summary text
+ * @return the current start of summary text.
*/
protected String getSummaryObjectStartText() {
return summaryObjectStartText;
@@ -2060,27 +1884,25 @@ protected String getSummaryObjectStartText() {
/**
* Gets whether to output array content detail.
*
- * @return the current array content detail setting
+ * @return the current array content detail setting.
*/
protected boolean isArrayContentDetail() {
return arrayContentDetail;
}
/**
- * Gets whether to use full detail when the caller doesn't
- * specify.
+ * Gets whether to use full detail when the caller doesn't specify.
*
- * @return the current defaultFullDetail flag
+ * @return the current defaultFullDetail flag.
*/
protected boolean isDefaultFullDetail() {
return defaultFullDetail;
}
/**
- * Gets whether the field separator should be added at the end
- * of each buffer.
+ * Gets whether the field separator should be added at the end of each
buffer.
*
- * @return fieldSeparatorAtEnd flag
+ * @return fieldSeparatorAtEnd flag.
* @since 2.0
*/
protected boolean isFieldSeparatorAtEnd() {
@@ -2088,10 +1910,9 @@ protected boolean isFieldSeparatorAtEnd() {
}
/**
- * Gets whether the field separator should be added at the start
- * of each buffer.
+ * Gets whether the field separator should be added at the start of each
buffer.
*
- * @return the fieldSeparatorAtStart flag
+ * @return the fieldSeparatorAtStart flag.
* @since 2.0
*/
protected boolean isFieldSeparatorAtStart() {
@@ -2101,16 +1922,14 @@ protected boolean isFieldSeparatorAtStart() {
/**
* Is this field to be output in full detail.
*
- * <p>This method converts a detail request into a detail level.
- * The calling code may request full detail ({@code true}),
- * but a subclass might ignore that and always return
- * {@code false}. The calling code may pass in
- * {@code null} indicating that it doesn't care about
- * the detail level. In this case the default detail level is
- * used.</p>
+ * <p>
+ * This method converts a detail request into a detail level. The calling
code may request full detail ({@code true}), but a subclass might ignore that
and
+ * always return {@code false}. The calling code may pass in {@code null}
indicating that it doesn't care about the detail level. In this case the default
+ * detail level is used.
+ * </p>
*
- * @param fullDetailRequest the detail level requested
- * @return whether full detail is to be shown
+ * @param fullDetailRequest the detail level requested.
+ * @return whether full detail is to be shown.
*/
protected boolean isFullDetail(final Boolean fullDetailRequest) {
if (fullDetailRequest == null) {
@@ -2125,7 +1944,7 @@ protected boolean isFullDetail(final Boolean
fullDetailRequest) {
/**
* Gets whether to use the class name.
*
- * @return the current useClassName flag
+ * @return the current useClassName flag.
*/
protected boolean isUseClassName() {
return useClassName;
@@ -2134,7 +1953,7 @@ protected boolean isUseClassName() {
/**
* Gets whether to use the field names passed in.
*
- * @return the current useFieldNames flag
+ * @return the current useFieldNames flag.
*/
protected boolean isUseFieldNames() {
return useFieldNames;
@@ -2143,7 +1962,7 @@ protected boolean isUseFieldNames() {
/**
* Gets whether to use the identity hash code.
*
- * @return the current useIdentityHashCode flag
+ * @return the current useIdentityHashCode flag.
*/
protected boolean isUseIdentityHashCode() {
return useIdentityHashCode;
@@ -2152,7 +1971,7 @@ protected boolean isUseIdentityHashCode() {
/**
* Gets whether to output short or long class names.
*
- * @return the current useShortClassName flag
+ * @return the current useShortClassName flag.
* @since 2.0
*/
protected boolean isUseShortClassName() {
@@ -2162,10 +1981,9 @@ protected boolean isUseShortClassName() {
/**
* Appends to the {@code toString} the detail of an array type.
*
- * @param buffer the {@link StringBuffer} to populate
- * @param fieldName the field name, typically not used as already appended
- * @param array the array to add to the {@code toString},
- * not {@code null}
+ * @param buffer the {@link StringBuffer} to populate.
+ * @param fieldName the field name, typically not used as already appended.
+ * @param array the array to add to the {@code toString}, not {@code
null}.
* @since 2.0
*/
protected void reflectionAppendArrayDetail(final StringBuffer buffer,
final String fieldName, final Object array) {
@@ -2180,7 +1998,7 @@ protected void reflectionAppendArrayDetail(final
StringBuffer buffer, final Stri
/**
* Remove the last field separator from the buffer.
*
- * @param buffer the {@link StringBuffer} to populate
+ * @param buffer the {@link StringBuffer} to populate.
* @since 2.0
*/
protected void removeLastFieldSeparator(final StringBuffer buffer) {
@@ -2192,7 +2010,7 @@ protected void removeLastFieldSeparator(final
StringBuffer buffer) {
/**
* Sets whether to output array content detail.
*
- * @param arrayContentDetail the new arrayContentDetail flag
+ * @param arrayContentDetail the new arrayContentDetail flag.
*/
protected void setArrayContentDetail(final boolean arrayContentDetail) {
this.arrayContentDetail = arrayContentDetail;
@@ -2201,10 +2019,11 @@ protected void setArrayContentDetail(final boolean
arrayContentDetail) {
/**
* Sets the array end text.
*
- * <p>{@code null} is accepted, but will be converted to
- * an empty String.</p>
+ * <p>
+ * {@code null} is accepted, but will be converted to an empty String.
+ * </p>
*
- * @param arrayEnd the new array end text
+ * @param arrayEnd the new array end text.
*/
protected void setArrayEnd(String arrayEnd) {
if (arrayEnd == null) {
@@ -2216,10 +2035,11 @@ protected void setArrayEnd(String arrayEnd) {
/**
* Sets the array separator text.
*
- * <p>{@code null} is accepted, but will be converted to
- * an empty String.</p>
+ * <p>
+ * {@code null} is accepted, but will be converted to an empty String.
+ * </p>
*
- * @param arraySeparator the new array separator text
+ * @param arraySeparator the new array separator text.
*/
protected void setArraySeparator(String arraySeparator) {
if (arraySeparator == null) {
@@ -2231,10 +2051,11 @@ protected void setArraySeparator(String arraySeparator)
{
/**
* Sets the array start text.
*
- * <p>{@code null} is accepted, but will be converted to
- * an empty String.</p>
+ * <p>
+ * {@code null} is accepted, but will be converted to an empty String.
+ * </p>
*
- * @param arrayStart the new array start text
+ * @param arrayStart the new array start text.
*/
protected void setArrayStart(String arrayStart) {
if (arrayStart == null) {
@@ -2246,10 +2067,11 @@ protected void setArrayStart(String arrayStart) {
/**
* Sets the content end text.
*
- * <p>{@code null} is accepted, but will be converted to
- * an empty String.</p>
+ * <p>
+ * {@code null} is accepted, but will be converted to an empty String.
+ * </p>
*
- * @param contentEnd the new content end text
+ * @param contentEnd the new content end text.
*/
protected void setContentEnd(String contentEnd) {
if (contentEnd == null) {
@@ -2261,10 +2083,11 @@ protected void setContentEnd(String contentEnd) {
/**
* Sets the content start text.
*
- * <p>{@code null} is accepted, but will be converted to
- * an empty String.</p>
+ * <p>
+ * {@code null} is accepted, but will be converted to an empty String.
+ * </p>
*
- * @param contentStart the new content start text
+ * @param contentStart the new content start text.
*/
protected void setContentStart(String contentStart) {
if (contentStart == null) {
@@ -2274,10 +2097,9 @@ protected void setContentStart(String contentStart) {
}
/**
- * Sets whether to use full detail when the caller doesn't
- * specify.
+ * Sets whether to use full detail when the caller doesn't specify.
*
- * @param defaultFullDetail the new defaultFullDetail flag
+ * @param defaultFullDetail the new defaultFullDetail flag.
*/
protected void setDefaultFullDetail(final boolean defaultFullDetail) {
this.defaultFullDetail = defaultFullDetail;
@@ -2286,10 +2108,11 @@ protected void setDefaultFullDetail(final boolean
defaultFullDetail) {
/**
* Sets the field name value separator text.
*
- * <p>{@code null} is accepted, but will be converted to
- * an empty String.</p>
+ * <p>
+ * {@code null} is accepted, but will be converted to an empty String.
+ * </p>
*
- * @param fieldNameValueSeparator the new field name value separator text
+ * @param fieldNameValueSeparator the new field name value separator text.
*/
protected void setFieldNameValueSeparator(String fieldNameValueSeparator) {
if (fieldNameValueSeparator == null) {
@@ -2301,10 +2124,11 @@ protected void setFieldNameValueSeparator(String
fieldNameValueSeparator) {
/**
* Sets the field separator text.
*
- * <p>{@code null} is accepted, but will be converted to
- * an empty String.</p>
+ * <p>
+ * {@code null} is accepted, but will be converted to an empty String.
+ * </p>
*
- * @param fieldSeparator the new field separator text
+ * @param fieldSeparator the new field separator text.
*/
protected void setFieldSeparator(String fieldSeparator) {
if (fieldSeparator == null) {
@@ -2314,10 +2138,9 @@ protected void setFieldSeparator(String fieldSeparator) {
}
/**
- * Sets whether the field separator should be added at the end
- * of each buffer.
+ * Sets whether the field separator should be added at the end of each
buffer.
*
- * @param fieldSeparatorAtEnd the fieldSeparatorAtEnd flag
+ * @param fieldSeparatorAtEnd the fieldSeparatorAtEnd flag.
* @since 2.0
*/
protected void setFieldSeparatorAtEnd(final boolean fieldSeparatorAtEnd) {
@@ -2325,10 +2148,9 @@ protected void setFieldSeparatorAtEnd(final boolean
fieldSeparatorAtEnd) {
}
/**
- * Sets whether the field separator should be added at the start
- * of each buffer.
+ * Sets whether the field separator should be added at the start of each
buffer.
*
- * @param fieldSeparatorAtStart the fieldSeparatorAtStart flag
+ * @param fieldSeparatorAtStart the fieldSeparatorAtStart flag.
* @since 2.0
*/
protected void setFieldSeparatorAtStart(final boolean
fieldSeparatorAtStart) {
@@ -2338,10 +2160,11 @@ protected void setFieldSeparatorAtStart(final boolean
fieldSeparatorAtStart) {
/**
* Sets the text to output when {@code null} found.
*
- * <p>{@code null} is accepted, but will be converted to
- * an empty String.</p>
+ * <p>
+ * {@code null} is accepted, but will be converted to an empty String.
+ * </p>
*
- * @param nullText the new text to output when null found
+ * @param nullText the new text to output when null found.
*/
protected void setNullText(String nullText) {
if (nullText == null) {
@@ -2351,15 +2174,17 @@ protected void setNullText(String nullText) {
}
/**
- * Sets the end text to output when a {@link Collection},
- * {@link Map} or array size is output.
+ * Sets the end text to output when a {@link Collection}, {@link Map} or
array size is output.
*
- * <p>This is output after the size value.</p>
+ * <p>
+ * This is output after the size value.
+ * </p>
*
- * <p>{@code null} is accepted, but will be converted to
- * an empty String.</p>
+ * <p>
+ * {@code null} is accepted, but will be converted to an empty String.
+ * </p>
*
- * @param sizeEndText the new end of size text
+ * @param sizeEndText the new end of size text.
*/
protected void setSizeEndText(String sizeEndText) {
if (sizeEndText == null) {
@@ -2369,15 +2194,17 @@ protected void setSizeEndText(String sizeEndText) {
}
/**
- * Sets the start text to output when a {@link Collection},
- * {@link Map} or array size is output.
+ * Sets the start text to output when a {@link Collection}, {@link Map} or
array size is output.
*
- * <p>This is output before the size value.</p>
+ * <p>
+ * This is output before the size value.
+ * </p>
*
- * <p>{@code null} is accepted, but will be converted to
- * an empty String.</p>
+ * <p>
+ * {@code null} is accepted, but will be converted to an empty String.
+ * </p>
*
- * @param sizeStartText the new start of size text
+ * @param sizeStartText the new start of size text.
*/
protected void setSizeStartText(String sizeStartText) {
if (sizeStartText == null) {
@@ -2387,15 +2214,17 @@ protected void setSizeStartText(String sizeStartText) {
}
/**
- * Sets the end text to output when an {@link Object} is
- * output in summary mode.
+ * Sets the end text to output when an {@link Object} is output in summary
mode.
*
- * <p>This is output after the size value.</p>
+ * <p>
+ * This is output after the size value.
+ * </p>
*
- * <p>{@code null} is accepted, but will be converted to
- * an empty String.</p>
+ * <p>
+ * {@code null} is accepted, but will be converted to an empty String.
+ * </p>
*
- * @param summaryObjectEndText the new end of summary text
+ * @param summaryObjectEndText the new end of summary text.
*/
protected void setSummaryObjectEndText(String summaryObjectEndText) {
if (summaryObjectEndText == null) {
@@ -2405,15 +2234,17 @@ protected void setSummaryObjectEndText(String
summaryObjectEndText) {
}
/**
- * Sets the start text to output when an {@link Object} is
- * output in summary mode.
+ * Sets the start text to output when an {@link Object} is output in
summary mode.
*
- * <p>This is output before the size value.</p>
+ * <p>
+ * This is output before the size value.
+ * </p>
*
- * <p>{@code null} is accepted, but will be converted to
- * an empty String.</p>
+ * <p>
+ * {@code null} is accepted, but will be converted to an empty String.
+ * </p>
*
- * @param summaryObjectStartText the new start of summary text
+ * @param summaryObjectStartText the new start of summary text.
*/
protected void setSummaryObjectStartText(String summaryObjectStartText) {
if (summaryObjectStartText == null) {
@@ -2425,7 +2256,7 @@ protected void setSummaryObjectStartText(String
summaryObjectStartText) {
/**
* Sets whether to use the class name.
*
- * @param useClassName the new useClassName flag
+ * @param useClassName the new useClassName flag.
*/
protected void setUseClassName(final boolean useClassName) {
this.useClassName = useClassName;
@@ -2434,7 +2265,7 @@ protected void setUseClassName(final boolean
useClassName) {
/**
* Sets whether to use the field names passed in.
*
- * @param useFieldNames the new useFieldNames flag
+ * @param useFieldNames the new useFieldNames flag.
*/
protected void setUseFieldNames(final boolean useFieldNames) {
this.useFieldNames = useFieldNames;
@@ -2443,7 +2274,7 @@ protected void setUseFieldNames(final boolean
useFieldNames) {
/**
* Sets whether to use the identity hash code.
*
- * @param useIdentityHashCode the new useIdentityHashCode flag
+ * @param useIdentityHashCode the new useIdentityHashCode flag.
*/
protected void setUseIdentityHashCode(final boolean useIdentityHashCode) {
this.useIdentityHashCode = useIdentityHashCode;
@@ -2452,7 +2283,7 @@ protected void setUseIdentityHashCode(final boolean
useIdentityHashCode) {
/**
* Sets whether to output short or long class names.
*
- * @param useShortClassName the new useShortClassName flag
+ * @param useShortClassName the new useShortClassName flag.
* @since 2.0
*/
protected void setUseShortClassName(final boolean useShortClassName) {