Doubt eclipse tool

Asked

Viewed 27 times

0

It is possible to generate Getters and Setters automatically only of selected variables?

inserir a descrição da imagem aqui

  • 1

    Menu "source -> generate getters and setters" and there you choose which one you want to generate. Now to generate from what is already selected, do not know...

1 answer

2

By right-clicking the class you can define the getters/setters methods:

inserir a descrição da imagem aqui

And once on the screen shown, you can select attributes as well as only generate getter or Setter:

inserir a descrição da imagem aqui

  • Hi escapistabr, thank you for the answer, this is the standard way I use to generate getters and setters, however, I’m dealing with a class with many variables, and I would like to generate getters and setters only of the variables I select, leave them marked so I can generate only of the marked ones. This way comes with all the variables that exist in the class...

Browser other questions tagged

You are not signed in. Login or sign up in order to post.