public final class ToStringBuilder
extends java.lang.Object
Object.equals(Object)
and Object.hashCode()
.
Infinite object graphs (graphs which always create new objects on traversal)
will cause infinite cycle.Modifier and Type | Field and Description |
---|---|
protected java.lang.StringBuilder |
builder |
protected boolean |
expandRecords |
protected Namespace |
namespace |
protected java.util.Set<RecordHolder> |
visited |
Modifier and Type | Method and Description |
---|---|
protected void |
append(java.lang.Object object) |
protected void |
appendElements(java.util.Collection<?> elements) |
static java.lang.String |
toString(java.lang.Object object,
boolean expandRecords)
Returns a string representation for given object.
|
static java.lang.String |
toString(java.lang.Object object,
boolean expandRecords,
Namespace namespace)
Returns a string representation for given object.
|
static java.lang.String |
toString(java.lang.Object object,
Namespace namespace,
java.lang.String nullString)
Returns a string representation for given object.
|
protected final java.util.Set<RecordHolder> visited
protected final java.lang.StringBuilder builder
protected final boolean expandRecords
protected final Namespace namespace
public static java.lang.String toString(java.lang.Object object, boolean expandRecords)
object
- expandRecords
- java.lang.IllegalArgumentException
- if object
has no language typepublic static java.lang.String toString(java.lang.Object object, boolean expandRecords, Namespace namespace)
object
- expandRecords
- namespace
- java.lang.IllegalArgumentException
- if object
has no language typepublic static java.lang.String toString(java.lang.Object object, Namespace namespace, java.lang.String nullString)
object
- namespace
- nullString
- string representation of null
protected void append(java.lang.Object object)
protected void appendElements(java.util.Collection<?> elements)
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.