I am working on a new Android project (Java), and created an Object with a large number of variables. Since I am planning to add getters and setters for all of them, I was wondering: is there a shortcut in Eclipse for automatically generating the getters and setters in a given class?
I am working on a new Android project ( Java ), and created an
Share
Bring up the context menu (i.e. right click) in the source code window of the desired class. Then select the
Sourcesubmenu; from that menu selectingGenerate Getters and Setters...will cause a wizard window to appear.Source -> Generate Getters and Setters...Select the variables you wish to create getters and setters for and click
OK.