While working in my latest project, I came across a situation where I needed a toString method for my TO (Transfer Object) classes. Instead of using reflection, I simply downloaded Eclipse Plugin for toString generation. Restart the Eclipse and it is ready to be used. For any class that require a toString(), switch to Package Explorer, and right click on the class name. Select 'Generate toString' from the context menu, select the fields, and the method is there in the class!
I had this plugin for quite some time, and had actually forgotton that its not the part of Eclipse. So, in my current project, when I failed to see 'toString generator', I realized it a plugin :)
Besides toString, if you like to see equals() and hashCode() methods as well, use Commonclipse plugin.
Blog on things around me - Applications, Java Platform, Free & Open Source Software, Gadgets, Utilities...
Subscribe to:
Post Comments (Atom)
Total Pageviews
Diving into the Controversial World of IPL with Lalit Modi
Lalit Modi, the mastermind behind the Indian Premier League (IPL), recently had a candid interview with Raj Shamani. The interview delved d...
-
Bugzilla is the Bugs/Issues Tracking Tool from The Mozilla Organization. Version 2.18 is the latest stable release. There are couple of res...
-
Two MIT math graduates bump into each other at Fairway on the upper west side. They hadn't seen each other in over 20 years. The first g...
No comments:
Post a Comment