| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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 use| Method Detail | 
|---|
protected final ValueStyler getValueStyler()
public void styleStart(StringBuffer buffer,
                       Object obj)
ToStringStylertoString()'ed object before its fields are styled.
styleStart in interface ToStringStylerbuffer - the buffer to print toobj - the object to style
public void styleEnd(StringBuffer buffer,
                     Object o)
ToStringStylertoString()'ed object after it's fields are styled.
styleEnd in interface ToStringStylerbuffer - the buffer to print too - the object to style
public void styleField(StringBuffer buffer,
                       String fieldName,
                       Object value)
ToStringStyler
styleField in interface ToStringStylerbuffer - the buffer to print tofieldName - the he name of the fieldvalue - the field value
protected void styleFieldStart(StringBuffer buffer,
                               String fieldName)
protected void styleFieldEnd(StringBuffer buffer,
                             String fieldName)
public void styleValue(StringBuffer buffer,
                       Object value)
ToStringStyler
styleValue in interface ToStringStylerbuffer - the buffer to print tovalue - the field valuepublic void styleFieldSeparator(StringBuffer buffer)
ToStringStyler
styleFieldSeparator in interface ToStringStylerbuffer - buffer to print to| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||