Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Javadoc not generated for Lombok getter and setter

Tags:

javadoc

lombok

I am having a problem with generating Javadoc for Lombok getters and setters. I have tried both suggestions here. An example field and its text are as follows:

/**    *  Identifier of the client  *   *  @param clientID changes the id of the client   *  @return id of the client  */ @Getter @Setter private Integer clientID; 

However, I see neither the getter nor the setter in the generated Javadoc. I am using 'protected' visibility on Eclipse (Project -> Generate Javadoc...). My Lombok version is 1.12.4. Any suggestions?

like image 750
Egemen Avatar asked Aug 28 '15 14:08

Egemen


People also ask

What is @getter annotation in Java?

The @Getter annotation is used to generate the default getter implementation for fields that are annotated with the annotation. This annotation can also be used at the class level in which Lombok will generate the getter methods for all fields.

How do you override the getter in Lombok?

From Lombok documentation: You can always manually disable getter/setter generation for any field by using the special AccessLevel. NONE access level. This lets you override the behaviour of a @Getter, @Setter or @Data annotation on a class.

What is @getter and @setter in spring boot?

Getters and Setters play an important role in retrieving and updating the value of a variable outside the encapsulating class. A setter updates the value of a variable, while a getter reads the value of a variable.


1 Answers

The javadoc feature does not work in the eclipse javadoc view or hovers. You can generate the javadoc by running delombok on the code first and then run the javadoc compiler, as is hinted on the feature page near the bottom.

Disclosure: I am a Lombok developer.

like image 121
Roel Spilker Avatar answered Sep 20 '22 00:09

Roel Spilker