Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Lombok Private Constructor

Tags:

Is there any annotation available for Lombok private NoArgConstructor? Lombok @NoArgConstructor creates a public Constructor with no parameter. But I want private constructor annotation.

like image 733
emon Avatar asked May 23 '20 23:05

emon


Video Answer


1 Answers

Use the access level element in the annotation. @NoArgsConstructor(access = AccessLevel.PRIVATE)

like image 82
johnnieb Avatar answered Dec 06 '22 14:12

johnnieb