projectlombok / lombok

Very spicy additions to the Java programming language.
https://projectlombok.org/
Other
12.86k stars 2.38k forks source link

[FEATURE] #2800

Open hzdjulytech opened 3 years ago

hzdjulytech commented 3 years ago

Before submitting Please check our wiki because some feature requests are asked a lot and there are good reasons (as explained on the wiki) why we can't (yet) implement them or why we won't implement them.

Describe the feature Copy the Doc annotation on the field to the getter method

eg:

@Getter public class A{ /xxxxx/ private String xx; }

=>

@Getter public class A{ /xxxxx/ private String xx; /xxxxx/ public String getXx(){ return xx; } }

janrieke commented 3 years ago

Do you mean the javadoc on the field? Lombok copies that since ages. See the documentation for details. Note that you have to use delombok before generating your docs via javadoc tool.

Do you have a special use case that does not work?

hzdjulytech commented 3 years ago

I tried it .Can be generated at packaging time.Now I expect to be able to customize the content. Can you generalize SPI to extend content generation ? eg: @io.swagger.annotations.ApiModelProperty("xxx") private String xx;