|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ToStringStyler
A strategy interface for pretty-printing toString()
methods.
Encapsulates the print algorithms; some other object such as a builder
should provide the workflow.
Method Summary | |
---|---|
void |
styleEnd(StringBuilder buffer,
Object obj)
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. |
void |
styleFieldSeparator(StringBuilder buffer)
Style the field separator. |
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. |
Method Detail |
---|
void styleStart(StringBuilder buffer, Object obj)
toString()
'ed object before its fields are styled.
buffer
- the buffer to print toobj
- the object to stylevoid styleEnd(StringBuilder buffer, Object obj)
toString()
'ed object after it's fields are styled.
buffer
- the buffer to print toobj
- the object to stylevoid styleField(StringBuilder buffer, String fieldName, Object value)
buffer
- the buffer to print tofieldName
- the he name of the fieldvalue
- the field valuevoid styleValue(StringBuilder buffer, Object value)
buffer
- the buffer to print tovalue
- the field valuevoid styleFieldSeparator(StringBuilder buffer)
buffer
- buffer to print to
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |