ToStringUtil (Apache Tomcat 10.1.57 API Documentation)
Description: declaration: package: org.apache.catalina.util, class: ToStringUtil

# Class ToStringUtil

java.lang.Object
org.apache.catalina.util.ToStringUtil

public class ToStringUtil extends Object
Utility class used to help generate return values for calls to `Object.toString()`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static String`
  `toString(Object obj, Container container)`
  Generates a toString representation for an object with an associated container.
  `static String`
  `toString(Object obj, Manager manager)`
  Generates a toString representation for an object with an associated manager.
  `static String`
  `toString(Contained contained)`
  Generates a toString representation for a Contained component.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### toString

    public static String toString(Contained contained)
    Generates a toString representation for a Contained component.
    Parameters:
      `contained` - the component
    Returns:
      the string representation

  - ### toString

    public static String toString(Object obj, Container container)
    Generates a toString representation for an object with an associated container.
    Parameters:
      `obj` - the object
      `container` - the associated container
    Returns:
      the string representation

  - ### toString

    public static String toString(Object obj, Manager manager)
    Generates a toString representation for an object with an associated manager.
    Parameters:
      `obj` - the object
      `manager` - the associated manager
    Returns:
      the string representation