A key insight, suggested by Gemini and several other LLMs, is to use JDK 24's Class-File API for zero-reflection classpath scanning, and then MethodHandles for fast object instantiation. The solution is JSR-330 compliant.
Migrated a real project (Dimension-UI) from Dagger 2 in 2 days. Key improvements: - No bytecode generation or proxying magic - Actual testability (isolated unit tests now work) - 19KB footprint vs 10MB+ for Spring - Startup is instant
Links
Dimension‑DI: https://github.com/akardapolov/dimension-di Dimension‑UI: https://github.com/akardapolov/dimension-ui
DI Containers Comparison: https://github.com/Heapy/di-comparison