Package org.springframework.core.style
Class DefaultToStringStyler
java.lang.Object
org.springframework.core.style.DefaultToStringStyler
- All Implemented Interfaces:
- ToStringStyler
Spring's default 
toString() styler.
 This class is used by ToStringCreator to style toString()
 output in a consistent manner according to Spring conventions.
- Since:
- 1.2.2
- Author:
- Keith Donald, Juergen Hoeller
- 
Constructor SummaryConstructorsConstructorDescriptionDefaultToStringStyler(ValueStyler valueStyler) Create a new DefaultToStringStyler.
- 
Method SummaryModifier and TypeMethodDescriptionprotected final ValueStylerReturn the ValueStyler used by this ToStringStyler.voidstyleEnd(StringBuilder buffer, Object o) Style atoString()'ed object after it's fields are styled.voidstyleField(StringBuilder buffer, String fieldName, @Nullable Object value) Style a field value as a string.protected voidstyleFieldEnd(StringBuilder buffer, String fieldName) voidstyleFieldSeparator(StringBuilder buffer) Style the field separator.protected voidstyleFieldStart(StringBuilder buffer, String fieldName) voidstyleStart(StringBuilder buffer, Object obj) Style atoString()'ed object before its fields are styled.voidstyleValue(StringBuilder buffer, @Nullable Object value) Style the given value.
- 
Constructor Details- 
DefaultToStringStylerCreate a new DefaultToStringStyler.- Parameters:
- valueStyler- the ValueStyler to use
 
 
- 
- 
Method Details- 
getValueStylerReturn the ValueStyler used by this ToStringStyler.
- 
styleStartDescription copied from interface:ToStringStylerStyle atoString()'ed object before its fields are styled.- Specified by:
- styleStartin interface- ToStringStyler
- Parameters:
- buffer- the buffer to print to
- obj- the object to style
 
- 
styleEndDescription copied from interface:ToStringStylerStyle atoString()'ed object after it's fields are styled.- Specified by:
- styleEndin interface- ToStringStyler
- Parameters:
- buffer- the buffer to print to
- o- the object to style
 
- 
styleFieldDescription copied from interface:ToStringStylerStyle a field value as a string.- Specified by:
- styleFieldin interface- ToStringStyler
- Parameters:
- buffer- the buffer to print to
- fieldName- the name of the field
- value- the field value
 
- 
styleFieldStart
- 
styleFieldEnd
- 
styleValueDescription copied from interface:ToStringStylerStyle the given value.- Specified by:
- styleValuein interface- ToStringStyler
- Parameters:
- buffer- the buffer to print to
- value- the field value
 
- 
styleFieldSeparatorDescription copied from interface:ToStringStylerStyle the field separator.- Specified by:
- styleFieldSeparatorin interface- ToStringStyler
- Parameters:
- buffer- the buffer to print to
 
 
-