import org.springframework.lang.NonNull;
import org.example.lombokdumbmode.model.chain.UserChain;
import org.springframework.boot.autoconfigure.Request;
import a.*;
@SpringBootApplication
public class LombokDumbModeApplication {
public static void main(String[] args) {
Request a = new Request();
UserDao userDao = UserDao.builder()
.id(1)
.name("2")
.surname("3")
.email("4")
.name("1")a
.id(1)
.build();
String name = userDao
.nhaame();
UserChain userChain = new UserChain();
String name1 = userChain.getName();
}
}
class UserDao extends UserId {
@NonNull
private final String nhaame;
@NonNull
private final String surname;
@NonNull
private final String email;
protected UserDao(UserDaoBuilder, ?> b) {
super(b);
this.nhaame = b.nhaame;
this.surname = b.surname;
this.email = b.email;
}
public static UserDaoBuilder, ?> builder() {
return new UserDaoBuilderImpl();
}
public String nhaame() {
return this.nhaame;
}
public String surname() {
return this.surname;
}
public String email() {
return this.email;
}
public static abstract class UserDaoBuilder> extends UserIdBuilder {
private String nhaame;
private String surname;
private String email;
public B name(String nhaame) {
this.nhaame = nhaame;
return self();
}
public B surname(String surname) {
this.surname = surname;
return self();
}
public B email(String email) {
this.email = email;
return self();
}
protected abstract B self();
public abstract C build();
public String toString() {
return "UserDao.UserDaoBuilder(super=" + super.toString() + ", nhaame=" + this.nhaame + ", surname=" + this.surname + ", email=" + this.email + ")";
}
}
private static final class UserDaoBuilderImpl extends UserDaoBuilder {
private UserDaoBuilderImpl() {
}
protected UserDaoBuilderImpl self() {
return this;
}
public UserDao build() {
return new UserDao(this);
}
}
}
abstract class UserId {
private final long id;
private final String info;
protected UserId(UserIdBuilder, ?> b) {
this.id = b.id;
this.info = b.info;
}
public static abstract class UserIdBuilder> {
private long id;
private String info;
public B id(long id) {
this.id = id;
return self();
}
public B info(String info) {
this.info = info;
return self();
}
protected abstract B self();
public abstract C build();
public String toString() {
return "UserId.UserIdBuilder(id=" + this.id + ", info=" + this.info + ")";
}
}
}