Search code examples
javaeclipsecode-completion

Create automatically only getters in Eclipse


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


Solution

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