Created
October 24, 2024 22:48
-
-
Save maxandersen/ffc3785ebe7326c7d16a166ed6af6ea9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///usr/bin/env jbang "$0" "$@" ; exit $? | |
//PREVIEW | |
//JAVA 23+ | |
//JAVAC_OPTIONS -proc:full -s gensrc | |
//DEPS cc.jilt:jilt:1.6.1 | |
import static java.lang.System.*; | |
import java.sql.Date; | |
import org.jilt.Builder; | |
@Builder | |
record Person(String name, int age, Date birthday) { | |
} | |
@Builder | |
record Funky(String name, int age, String funky) { | |
} | |
class x { | |
public static void main(String... args) { | |
var p = PersonBuilder.person().age(42).name("dsaf").birthday(null).build(); | |
out.println(p); | |
var f = FunkyBuilder.funky().age(42).funky("funky").build(); | |
out.println(f); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment