lombok 基础注解之 @Data
public class Yoona {
private String nname;
public static final int age = 18;
@NonNull
private String address;
private Yoona(@NonNull String address) {
if (address == null)
throw new NullPointerException("address is marked non-null but is null");
this.address = address;
}
public static Yoona newInstance(@NonNull String address) {
return new Yoona(address);
}
/** ---------- setter、getter 等方法省略 ---------- **/