[Apache Commons]ToStringBuilder的几种ToStringStyle

老是记不住,干脆把它们抄到博客中来

1. DEFAULT_STYLE

   Person@182f0db[name=John Doe,age=33,smoker=false]

2. MULTI_LINE_STYLE

    Person@182f0db[

   name=John Doe

   age=33

   smoker=false

]

3. NO_FIELD_NAMES_STYLE

   Person@182f0db[John Doe,33,false]

4. SHORT_PREFIX_STYLE

  Person[name=John Doe,age=33,smoker=false]

5. SIMPLE_STYLE

   John Doe,33,false

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.