Top Description Fields Constructors Methods
org.junit.platform.commons.util

public Class ToStringBuilder

extends Object
Class Inheritance
Annotations
@API
status:INTERNAL
since:1.0
Static Imports
java.lang.String.join, org.apiguardian.api.API.Status.INTERNAL

Simple builder for generating strings in custom implementations of toString().

DISCLAIMER

These utilities are intended solely for usage within the JUnit framework itself. Any usage by external parties is not supported. Use at your own risk!

Since
1.0

Field Summary

Modifier and TypeField and Description
private final String
private final List<String>

Constructor Summary

AccessConstructor and Description
public
public
public

Method Summary

Modifier and TypeMethod and Description
public ToStringBuilder
private String
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

typeNameback to summary
private final String typeName
valuesback to summary
private final List<String> values

Constructor Detail

ToStringBuilderback to summary
public ToStringBuilder(Object obj)
ToStringBuilderback to summary
public ToStringBuilder(Class<?> type)
ToStringBuilderback to summary
public ToStringBuilder(String typeName)
Annotations
@API
status:INTERNAL
since:1.7

Method Detail

appendback to summary
public ToStringBuilder append(String name, @Nullable Object value)
toStringback to summary
private String toString(@Nullable Object obj)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override