Using Google Guava’s Objects.ToStringHelper
I have a little trick for Guava’s com.google.common.base.MoreObjects.toStringHelper(). I configured IntelliJ IDEA to use it when auto-generating toString() methods. I assume you can do the same in Eclipse. Here’s how to do it in Intellij: go inside a class hit Alt + Insert to popup the “Generate” menu choose toString() click the “Settings” button go … Read more