Package | Description |
---|---|
org.apache.commons.lang3 |
Provides highly reusable static utility methods, chiefly concerned with adding value to the
java.lang classes. |
org.apache.commons.lang3.builder |
Assists in creating consistent
equals(Object) , toString() , hashCode() , and compareTo(Object) methods. |
Modifier and Type | Field and Description |
---|---|
private static ToStringStyle |
AnnotationUtils.TO_STRING_STYLE
A style that prints annotations as recommended.
|
Modifier and Type | Class and Description |
---|---|
class |
MultilineRecursiveToStringStyle
Works with
ToStringBuilder to create a "deep" toString . |
class |
RecursiveToStringStyle
Works with
ToStringBuilder to create a "deep" toString . |
class |
StandardToStringStyle
Works with
ToStringBuilder to create a toString . |
private static class |
ToStringStyle.DefaultToStringStyle
Default
ToStringStyle . |
private static class |
ToStringStyle.JsonToStringStyle
ToStringStyle that outputs with JSON format. |
private static class |
ToStringStyle.MultiLineToStringStyle
ToStringStyle that outputs on multiple lines. |
private static class |
ToStringStyle.NoClassNameToStringStyle
ToStringStyle that does not print out the classname
and identity hashcode but prints content start and field names. |
private static class |
ToStringStyle.NoFieldNameToStringStyle
ToStringStyle that does not print out
the field names. |
private static class |
ToStringStyle.ShortPrefixToStringStyle
ToStringStyle that prints out the short
class name and no identity hashcode. |
private static class |
ToStringStyle.SimpleToStringStyle
ToStringStyle that does not print out the
classname, identity hashcode, content start or field name. |
Modifier and Type | Field and Description |
---|---|
static ToStringStyle |
ToStringStyle.DEFAULT_STYLE
The default toString style.
|
private static ToStringStyle |
ToStringBuilder.defaultStyle
The default style of output to use, not null.
|
static ToStringStyle |
ToStringStyle.JSON_STYLE
The JSON toString style.
|
static ToStringStyle |
ToStringStyle.MULTI_LINE_STYLE
The multi line toString style.
|
static ToStringStyle |
ToStringStyle.NO_CLASS_NAME_STYLE
The no class name toString style.
|
static ToStringStyle |
ToStringStyle.NO_FIELD_NAMES_STYLE
The no field names toString style.
|
static ToStringStyle |
ToStringStyle.SHORT_PREFIX_STYLE
The short prefix toString style.
|
static ToStringStyle |
ToStringStyle.SIMPLE_STYLE
The simple toString style.
|
private ToStringStyle |
ToStringBuilder.style
The style of output to use, not null.
|
private ToStringStyle |
DiffResult.style |
private ToStringStyle |
DiffBuilder.style |
Modifier and Type | Method and Description |
---|---|
static ToStringStyle |
ToStringBuilder.getDefaultStyle()
Gets the default
ToStringStyle to use. |
ToStringStyle |
ToStringBuilder.getStyle()
Gets the
ToStringStyle being used. |
ToStringStyle |
DiffResult.getToStringStyle()
Returns the style used by the
DiffResult.toString() method. |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
ToStringBuilder.reflectionToString(java.lang.Object object,
ToStringStyle style)
Uses
ReflectionToStringBuilder to generate a
toString for the specified object. |
static java.lang.String |
ToStringBuilder.reflectionToString(java.lang.Object object,
ToStringStyle style,
boolean outputTransients)
Uses
ReflectionToStringBuilder to generate a
toString for the specified object. |
static <T> java.lang.String |
ToStringBuilder.reflectionToString(T object,
ToStringStyle style,
boolean outputTransients,
java.lang.Class<? super T> reflectUpToClass)
Uses
ReflectionToStringBuilder to generate a
toString for the specified object. |
static void |
ToStringBuilder.setDefaultStyle(ToStringStyle style)
Sets the default
ToStringStyle to use. |
static java.lang.String |
ReflectionToStringBuilder.toString(java.lang.Object object,
ToStringStyle style)
Builds a
toString value through reflection. |
static java.lang.String |
ReflectionToStringBuilder.toString(java.lang.Object object,
ToStringStyle style,
boolean outputTransients)
Builds a
toString value through reflection. |
static java.lang.String |
ReflectionToStringBuilder.toString(java.lang.Object object,
ToStringStyle style,
boolean outputTransients,
boolean outputStatics)
Builds a
toString value through reflection. |
java.lang.String |
DiffResult.toString(ToStringStyle style)
Builds a
String description of the differences contained within
this DiffResult , using the supplied ToStringStyle . |
static <T> java.lang.String |
ReflectionToStringBuilder.toString(T object,
ToStringStyle style,
boolean outputTransients,
boolean outputStatics,
java.lang.Class<? super T> reflectUpToClass)
Builds a
toString value through reflection. |
Constructor and Description |
---|
DiffBuilder(java.lang.Object lhs,
java.lang.Object rhs,
ToStringStyle style)
Constructs a builder for the specified objects with the specified style.
|
DiffBuilder(java.lang.Object lhs,
java.lang.Object rhs,
ToStringStyle style,
boolean testTriviallyEqual)
Constructs a builder for the specified objects with the specified style.
|
DiffResult(java.lang.Object lhs,
java.lang.Object rhs,
java.util.List<Diff<?>> diffs,
ToStringStyle style)
Creates a
DiffResult containing the differences between two
objects. |
ReflectionToStringBuilder(java.lang.Object object,
ToStringStyle style)
Constructor.
|
ReflectionToStringBuilder(java.lang.Object object,
ToStringStyle style,
java.lang.StringBuffer buffer)
Constructor.
|
ReflectionToStringBuilder(T object,
ToStringStyle style,
java.lang.StringBuffer buffer,
java.lang.Class<? super T> reflectUpToClass,
boolean outputTransients,
boolean outputStatics)
Constructor.
|
ToStringBuilder(java.lang.Object object,
ToStringStyle style)
Constructs a builder for the specified object using the a defined output style.
|
ToStringBuilder(java.lang.Object object,
ToStringStyle style,
java.lang.StringBuffer buffer)
Constructs a builder for the specified object.
|