ToStringBuilder append X appendSuper
-
19-09-2019 - |
Question
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
Solution
A ToStringStyle
implementation can render it differently when appendSuper is called from append. No implementation of Apache commons lang 2.4 does it.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow