Simple Getter/Setter comments

前端 未结 14 1029
悲&欢浪女
悲&欢浪女 2020-12-04 07:16

What convention do you use to comment getters and setters? This is something I\'ve wondered for quite some time, for instance:

/**
 * (1a) what do you put h         


        
14条回答
  •  既然无缘
    2020-12-04 07:38

    This kind of boilerplate can be avoided by using Project Lombok. Just document the field variable, even if it's private, and let Lombok annotations generate properly documented getters and setters.

    For me, this benefit alone is worth the costs.

提交回复
热议问题