java-record

Java Records and Lombok annotation - IntelliJ

六眼飞鱼酱① 提交于 2020-03-23 07:26:07
问题 Just trying a hands-on the java.lang.Record. I have gone through the documentation and the JEP-359 for some understanding. So upon reading about the implicit declaration of the constructor I thought of mixing it up with an existing code generation library - Lombok! Now what I've ended up creating as a minimal reproducible example is this record import lombok.AllArgsConstructor; @AllArgsConstructor public record Java(String version) { } which when compiled using IntelliJ successfully produces