How to write the constructor instead of using Lombok to access public level?

67 Views Asked by At

I changed the access level protected to public but how to write the constructor instead of using Lombok for below code?

@RequiredArgsConstructor(access = AccessLevel.PUBLIC))
public class abc implements xyz<Event, Void> {

    @NonNull private final Test<Lock<TransactionLock, TransactionLockId>> test;

    ..... }
1

There are 1 best solutions below

0
Nowhere Man On BEST ANSWER

It should be if there are no other final fields defined:

public class abc implements xyz<Event, Void> {

    @NonNull private final Test<Lock<TransactionLock, TransactionLockId>> test;

    public abc(@NotNull Test<Lock<TransactionLock, TransactionLockId>> test) {
        this.test = test;
    }
j