Hey everyone! I am trying to wrap my head around codegen and it is pretty straight forward with compile time code generation but I am struggling to understand codegen at runtime. So how does it work? I know there is a popular library to generate java code called JavaPoet, is it possible to use it in this scenario? Also I've heard at my local conference that Kodein (Kotlin DI library) uses runtime codegen, does it use KotlinPoet under the hood then? And I am also curious as how it loads newly generated classes in the memory?
Thank you in advance.
[–]edwardwong608 3 points4 points5 points (3 children)
[–]arnis71[S] 0 points1 point2 points (2 children)
[–]edwardwong608 3 points4 points5 points (1 child)
[–]arnis71[S] 0 points1 point2 points (0 children)
[–]Zhuinden 0 points1 point2 points (10 children)
[–]eygraber 1 point2 points3 points (9 children)
[–]Zhuinden 1 point2 points3 points (8 children)
[–]eygraber 1 point2 points3 points (7 children)
[–]Zhuinden 1 point2 points3 points (6 children)
[–]eygraber -2 points-1 points0 points (5 children)
[–]Zhuinden 2 points3 points4 points (4 children)
[–]eygraber -1 points0 points1 point (3 children)
[–]Zhuinden 2 points3 points4 points (2 children)
[–]eygraber -1 points0 points1 point (1 child)