Languages
[Edit]
EN

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

4 points
Created by:
Marcin
19340

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:

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