Alex Rivera | Logout

Create automatically only getters in Eclipse

Asked 2010-04-25T10:49:13.977
9

In Eclipse is it possible to create automatically Getters and Setters for a field. But I have a lot of private fields for which only getters should exist. Is somewhere in Eclipse a "create Getters" Function which does not create setters too?

Well, it is not so much work to write getters, but doing it automatically would be nice :)

Thank you, lerad

Edit
Report

1 Answer

12

On the Generate Setters and Getters screen you have Select getters button on the right - use it.

answered 2010-04-25T10:51:53.407

Your Answer