public final class ToStringBuilder extends 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 StringBuilder |
builder |
protected boolean |
expandRecords |
protected Namespace |
namespace |
protected Set<RecordHolder> |
visited |
Modifier and Type | Method and Description |
---|---|
protected void |
append(Object object) |
protected void |
appendElements(Collection<?> elements) |
static String |
toString(Object object,
boolean expandRecords)
Returns a string representation for given object.
|
static String |
toString(Object object,
boolean expandRecords,
Namespace namespace)
Returns a string representation for given object.
|
static String |
toString(Object object,
Namespace namespace,
String nullString)
Returns a string representation for given object.
|
protected final Set<RecordHolder> visited
protected final StringBuilder builder
protected final boolean expandRecords
protected final Namespace namespace
public static String toString(Object object, boolean expandRecords)
object
- expandRecords
- IllegalArgumentException
- if object
has no language typepublic static String toString(Object object, boolean expandRecords, Namespace namespace)
object
- expandRecords
- namespace
- IllegalArgumentException
- if object
has no language typepublic static String toString(Object object, Namespace namespace, String nullString)
object
- namespace
- nullString
- string representation of null
protected void append(Object object)
protected void appendElements(Collection<?> elements)
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.