Class ToStringBuilder



  • @API(status=INTERNAL,
         since="1.0")
    public class ToStringBuilder
    extends java.lang.Object
    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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ToStringBuilder append​(java.lang.String name, java.lang.Object value)  
      java.lang.String toString​()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ToStringBuilder

        public ToStringBuilder​(java.lang.Object obj)
      • ToStringBuilder

        public ToStringBuilder​(java.lang.Class<?> type)
    • Method Detail

      • append

        public ToStringBuilder append​(java.lang.String name,
                                      java.lang.Object value)
      • toString

        public java.lang.String toString​()
        Overrides:
        toString in class java.lang.Object