You can customize the output using the builder-style methods {@link ToStringBuilder#singleLine()} {@link ToStringBuilder#skipNulls()} and {@link ToStringBuilder#hideFieldNames()}.
You can either directly list fields to include via {@link ToStringBuilder#add(String,Object)} and {@link ToStringBuilder#add(Object)}or you can let the builder do it automatically using reflection, either including the fields declared in this class or including all superclasses.
The builder will automatically handle cycles in the object tree. It also pretty prints arrays and Iterables.
This class is not thread safe. @since 2.7
|
|