dagblog.
← Archive

Eclipse tips: generating toString


Eclipse tips: generating toString

For some time Eclipse has been able to generate hashCode and equals from a class’s instance variables. If you like generating those methods, you’re probably missing the third one, toString. Fortunately, the JUtils ToString Generator plugin adds that feature.

JUtils ToString Generator can generate toString from all instance variables for a single class or several classes at once. You can customize the generation template. For example, to put together the resulting string, you can choose StringBuilder, StringBuffer, or ordinary concatenation.

Archive image in Eclipse tips: generating toString, figure 1
Image could not be loaded. Archive image in Eclipse tips: generating toString, figure 1
↗ Medium

Medium version

Related articles

Related CZ Podcast episodes