Create automatically only getters in Eclipse

前端 未结 3 1290
忘掉有多难
忘掉有多难 2021-02-14 18:55

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 Eclips

3条回答
  •  梦如初夏
    2021-02-14 19:46

    What do you mean by automatically? My plugin lets one create fields with Getters or Setters. You might look into this : http://fast-code.sourceforge.net/. It has simple popup as below:
    (source: sourceforge.net)

    I should mention that eclipse has create Getters/Setters from the source menu. It also puts a marker beside any private member. Then one just needs to press Ctrl-1. Problem with that is it creates both getters or setters.

提交回复
热议问题