|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.core.style.DefaultToStringStyler
public class DefaultToStringStyler
Spring's default toString()
styler.
This class is used by ToStringCreator
to style toString()
output in a consistent manner according to Spring conventions.
Constructor Summary | |
---|---|
DefaultToStringStyler(ValueStyler valueStyler)
Create a new DefaultToStringStyler. |
Method Summary | |
---|---|
protected ValueStyler |
getValueStyler()
Return the ValueStyler used by this ToStringStyler. |
void |
styleEnd(StringBuffer buffer,
Object o)
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. |
protected void |
styleFieldEnd(StringBuffer buffer,
String fieldName)
|
void |
styleFieldSeparator(StringBuffer buffer)
Style the field separator. |
protected void |
styleFieldStart(StringBuffer buffer,
String fieldName)
|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultToStringStyler(ValueStyler valueStyler)
valueStyler
- the ValueStyler to useMethod Detail |
---|
protected final ValueStyler getValueStyler()
public void styleStart(StringBuffer buffer, Object obj)
ToStringStyler
toString()
'ed object before its fields are styled.
styleStart
in interface ToStringStyler
buffer
- the buffer to print toobj
- the object to stylepublic void styleEnd(StringBuffer buffer, Object o)
ToStringStyler
toString()
'ed object after it's fields are styled.
styleEnd
in interface ToStringStyler
buffer
- the buffer to print too
- the object to stylepublic void styleField(StringBuffer buffer, String fieldName, Object value)
ToStringStyler
styleField
in interface ToStringStyler
buffer
- the buffer to print tofieldName
- the he name of the fieldvalue
- the field valueprotected void styleFieldStart(StringBuffer buffer, String fieldName)
protected void styleFieldEnd(StringBuffer buffer, String fieldName)
public void styleValue(StringBuffer buffer, Object value)
ToStringStyler
styleValue
in interface ToStringStyler
buffer
- the buffer to print tovalue
- the field valuepublic void styleFieldSeparator(StringBuffer buffer)
ToStringStyler
styleFieldSeparator
in interface ToStringStyler
buffer
- buffer to print to
|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |