emon
emon

Reputation: 1949

Lombok Private Constructor

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

Upvotes: 95

Views: 62260

Answers (1)

johnnieb
johnnieb

Reputation: 4552

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

Upvotes: 179

Related Questions