org.springframework.core.style

## 类 DefaultToStringStyler

- java.lang.Object
- - org.springframework.core.style.DefaultToStringStyler

- 所有已实现的接口:
    ToStringStyler

      public class DefaultToStringStyler
      extends Object
      implements ToStringStyler

  Spring's default `toString()` styler.

  This class is used by `ToStringCreator` to style `toString()` output in a consistent manner according to Spring conventions.

  从以下版本开始:
    1.2.2
  作者:
    Keith Donald, Juergen Hoeller

- - ### 构造器概要

    构造器
    构造器和说明
    `DefaultToStringStyler(ValueStyler valueStyler)` Create a new DefaultToStringStyler.

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `protected ValueStyler` | `getValueStyler()` Return the ValueStyler used by this ToStringStyler.
    `void` | `styleEnd(StringBuilder buffer, Object o)` Style a `toString()`'ed object after it's fields are styled.
    `void` | `styleField(StringBuilder buffer, String fieldName, Object value)` Style a field value as a string.
    `protected void` | `styleFieldEnd(StringBuilder buffer, String fieldName)`
    `void` | `styleFieldSeparator(StringBuilder buffer)` Style the field separator.
    `protected void` | `styleFieldStart(StringBuilder buffer, String fieldName)`
    `void` | `styleStart(StringBuilder buffer, Object obj)` Style a `toString()`'ed object before its fields are styled.
    `void` | `styleValue(StringBuilder buffer, Object value)` Style the given value.

    - ### 从类继承的方法 java.lang.Object

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

- - ### 构造器详细资料

    - #### DefaultToStringStyler

          public DefaultToStringStyler(ValueStyler valueStyler)

      Create a new DefaultToStringStyler.
      参数:
        `valueStyler` - the ValueStyler to use

  - ### 方法详细资料

    - #### getValueStyler

          protected final ValueStyler getValueStyler()

      Return the ValueStyler used by this ToStringStyler.

    - #### styleStart

          public void styleStart(StringBuilder buffer,
                                 Object obj)

      从接口复制的说明: `ToStringStyler`
      Style a `toString()`'ed object before its fields are styled.
      指定者:
        `styleStart` 在接口中 `ToStringStyler`
      参数:
        `buffer` - the buffer to print to
        `obj` - the object to style

    - #### styleEnd

          public void styleEnd(StringBuilder buffer,
                               Object o)

      从接口复制的说明: `ToStringStyler`
      Style a `toString()`'ed object after it's fields are styled.
      指定者:
        `styleEnd` 在接口中 `ToStringStyler`
      参数:
        `buffer` - the buffer to print to
        `o` - the object to style

    - #### styleField

          public void styleField(StringBuilder buffer,
                                 String fieldName,
                                 @Nullable
                                 Object value)

      从接口复制的说明: `ToStringStyler`
      Style a field value as a string.
      指定者:
        `styleField` 在接口中 `ToStringStyler`
      参数:
        `buffer` - the buffer to print to
        `fieldName` - the he name of the field
        `value` - the field value

    - #### styleFieldStart

          protected void styleFieldStart(StringBuilder buffer,
                                         String fieldName)

    - #### styleFieldEnd

          protected void styleFieldEnd(StringBuilder buffer,
                                       String fieldName)

    - #### styleValue

          public void styleValue(StringBuilder buffer,
                                 @Nullable
                                 Object value)

      从接口复制的说明: `ToStringStyler`
      Style the given value.
      指定者:
        `styleValue` 在接口中 `ToStringStyler`
      参数:
        `buffer` - the buffer to print to
        `value` - the field value

    - #### styleFieldSeparator

          public void styleFieldSeparator(StringBuilder buffer)

      从接口复制的说明: `ToStringStyler`
      Style the field separator.
      指定者:
        `styleFieldSeparator` 在接口中 `ToStringStyler`
      参数:
        `buffer` - buffer to print to