Metaprogramming with JavaParser
summary
Metaprogramming gets concrete here: DRL rule files are transpiled into Java source (a compiled DRL → Java DSL) using JavaParser so Drools avoids heavy reflection and cuts startup time — the team reports handling up to a million rules at load-time by emitting bytecode ahead-of-time. Live demos use JShell as an eval host and show JavaParser AST transformations that replace placeholders and types, generate methods reliably, and enable running Drools on Quarkus/GraalVM AOT successfully.
AI-written summary · about
chapters (13)
- 0:00Start
- 1:13What Is Meta Programming
- 5:58Java Parser
- 6:27Business Rule Management System
- 7:02Business Rules
- 7:15Truce Rules Language
- 13:38What Is Source Code
- 27:20Binary Expression
- 32:00Abstract Syntax Tree
- 33:46Generics
- 40:44Java Syntax Specifications
- 41:33Api To Generate if Statement
- 43:36Partial Evaluation
related talks
39mYour Program as a Transpiler
44mMetaprogramming 2.0
48mMetaprogramming 2.0
40mYour Program as a Transpiler: Applying Compiler Design to Everyday Programming
42mCode Reflection
34mYour Program as a Transpiler: Applying Compiler Design to Everyday Programming
44mJava Code Analysis with Database and Domain Specific Language
44mLet's talk about transpilers
