
Foojay.io | Friends of OpenJDK and Java Programming· Staffel 6· Folge 103
Killing Reflection at Build Time: Avro, Codename One and Java Codegen (#103)
Samstag, 17. Oktober 2026 · 45 min
Kapitelklicken springt direkt hin
Shownotes
Runtime reflection is a quiet tax on the JVM. It is flexible, it is everywhere, and it is easy to stop noticing it until you go looking for where your CPU is actually going. Two teams did exactly that, in completely different corners of the ecosystem, and arrived at the same answer: move the work to build time.
In this episode, Dmitry Moskalyuk explains the model layer behind his Foojay article on reflection-free serialization, where JSON, XML, YAML and TOML all end up as Avro. Shai Almog explains the build-time codegen pipeline of Codename One, which aims for no reflection, no service loader and no Class.forName. We compare the two and ask whether generated code is really something to avoid.
Topics include:
• Where Jackson's reflection cost really lives, and what Blackbird does about it
• Jackson versus kotlinx.serialization, and why a missing feature sent the team back to Jackson
• Why a UI framework bans reflection, and how that differs from the backend
• Is generated code bad? Lombok, Manifold and jOOQ
• What Records and Project Leyden change for reflection
• Build time cost versus runtime cost, and a single source of truth for your data model
• Should you still use reflection in a new project?
Guests:
Dmitry Moskalyuk, Senior Backend Engineer
Dmitry on LinkedIn (linkedin.com/in/dmitry-moskalyuk)
Shai Almog, Author, DevRel and open source developer working on Codename One
Shai on LinkedIn (linkedin.com/in/shai-almog-81a42)
Links:
Dmitry's article on Foojay (foojay.io/today/reflection-free-serialization-…)
Shai's article on Foojay (foojay.io/today/openapi-orm-svg-and-lottie)
Jackson Blackbird (github.com/stevenschlansker/jackson-blackbird)
Apache Avro (avro.apache.org)
Project Leyden (openjdk.org/projects/leyden)
Full show notes with every link (foojay.io/today/foojay-podcast-103)
Timestamps:
Introduction of topic and guests
About the new Foojay, contributing with GitHub pull requests
What is Apache Avro
What is Codename One
What is Blackbird in Jackson and compared to kotlinx mechanisms for different content parsers
Why Codename One focuses on "no reflection, no service loader, no Class.forName"
Is automatically generated code bad (Lombok, Manifold, JOOQ)?
Java evolutions that bring improvements into the system (Records, Project Leyden)
Is reflection changing through Java versions?
Build time cost versus runtime, Project Leyden
Use of reflection in UI versus backend
Benefit of your data model in a (Java) object, having one source of truth, good debugging
Should you worry about serialization in a small project
Serialization and security
Should I still use reflection/serialization in a new project?
Conclusion