Java Getters and Setters

后端 未结 17 1536
终归单人心
终归单人心 2020-12-01 15:27

Is there a better standard way to create getters and setters in Java?

It is quite verbose to have to explicitly define getters and setters for each variable. Is ther

17条回答
  •  失恋的感觉
    2020-12-01 15:58

    There is also Spring Roo project with its @RooJavaBean annotation. It has also @RooToString and @RooHashCodeEquals or something like that. It generates in background an AspectJ file with proper methods.

提交回复
热议问题