Top Description Methods
org.springframework.core.style

public Interface ToStringStyler

Known Direct Implementers
org.springframework.core.style.DefaultToStringStyler
Imports
org.springframework.lang.Nullable

A strategy interface for pretty-printing toString() methods. Encapsulates the print algorithms; some other object such as a builder should provide the workflow.
Author
Keith Donald
Since
1.2.2

Method Summary

Modifier and TypeMethod and Description
public void
styleEnd(StringBuilder
the buffer to print to
buffer
,
Object
the object to style
obj
)

Style a toString()'ed object after it's fields are styled.

public void
styleField(StringBuilder
the buffer to print to
buffer
,
String
the name of the field
fieldName
,
Object
the field value
value
)

Style a field value as a string.

public void
styleFieldSeparator(StringBuilder
the buffer to print to
buffer
)

Style the field separator.

public void
styleStart(StringBuilder
the buffer to print to
buffer
,
Object
the object to style
obj
)

Style a toString()'ed object before its fields are styled.

public void
styleValue(StringBuilder
the buffer to print to
buffer
,
Object
the field value
value
)

Style the given value.

Method Detail

styleEndback to summary
public void styleEnd(StringBuilder buffer, Object obj)

Style a toString()'ed object after it's fields are styled.

Parameters
buffer:StringBuilder

the buffer to print to

obj:Object

the object to style

styleFieldback to summary
public void styleField(StringBuilder buffer, String fieldName, Object value)

Style a field value as a string.

Parameters
buffer:StringBuilder

the buffer to print to

fieldName:String

the name of the field

value:Object

the field value

styleFieldSeparatorback to summary
public void styleFieldSeparator(StringBuilder buffer)

Style the field separator.

Parameters
buffer:StringBuilder

the buffer to print to

styleStartback to summary
public void styleStart(StringBuilder buffer, Object obj)

Style a toString()'ed object before its fields are styled.

Parameters
buffer:StringBuilder

the buffer to print to

obj:Object

the object to style

styleValueback to summary
public void styleValue(StringBuilder buffer, Object value)

Style the given value.

Parameters
buffer:StringBuilder

the buffer to print to

value:Object

the field value