|
||||||||||
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(StringBuffer buffer,
Object obj)
Style a toString() 'ed object after it's fields are styled. |
void |
styleField(StringBuffer buffer,
String fieldName,
Object value)
Style a field value as a string. |
void |
styleFieldSeparator(StringBuffer buffer)
Style the field separator. |
void |
styleStart(StringBuffer buffer,
Object obj)
Style a toString() 'ed object before its fields are styled. |
void |
styleValue(StringBuffer buffer,
Object value)
Style the given value. |
Method Detail |
---|
void styleStart(StringBuffer buffer, Object obj)
toString()
'ed object before its fields are styled.
buffer
- the buffer to print toobj
- the object to stylevoid styleEnd(StringBuffer buffer, Object obj)
toString()
'ed object after it's fields are styled.
buffer
- the buffer to print toobj
- the object to stylevoid styleField(StringBuffer buffer, String fieldName, Object value)
buffer
- the buffer to print tofieldName
- the he name of the fieldvalue
- the field valuevoid styleValue(StringBuffer buffer, Object value)
buffer
- the buffer to print tovalue
- the field valuevoid styleFieldSeparator(StringBuffer buffer)
buffer
- buffer to print to
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |