Created
October 24, 2024 22:27
-
-
Save maxandersen/28b00e9dcfc900111f868ab970eb7550 to your computer and use it in GitHub Desktop.
This file contains hidden or 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) { | |
} | |
public class standaloneclass { | |
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