Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ToStringBuilder append X appendSuper

in my classes when writing the toString() method I always use the ToStringBuilder from org.apache.commons

And when I'm extending other classes I use appendSuper() and then my appends

The question:

Are there are any real differences in doing:

appendSuper(super.toString())

instead of

append(super.toString())

Kind of dummy question.

Cheers

like image 781
rafa.ferreira Avatar asked Nov 10 '09 12:11

rafa.ferreira


1 Answers

A ToStringStyle implementation can render it differently when appendSuper is called from append. No implementation of Apache commons lang 2.4 does it.

like image 103
Thomas Jung Avatar answered Sep 27 '22 22:09

Thomas Jung