Languages
[Edit]
EN

Lombok private constructor (@NoArgsConstructor, @AllArgsConstructor - Java / Lombok annotations)

4 points
Created by:
Yusef-Ewing
479

Quick solution:

@NoArgsConstructor(access = AccessLevel.PRIVATE)

 

Example:

import lombok.AccessLevel;
import lombok.NoArgsConstructor;

@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class TimeUtil {
    public static final int OFFSET = 5;
    // ...
}

Access level by default is public.

 

References:

Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

Lombok - java library

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join