Today I was wondering why frameworks like `Hibernate use reflection instead of code generation (for example using libraries like BCEL or ASM) during compilation/application startup.
Is it because of historical reasons (when Hibernate
was being written there was no such library available that would allow byte code generation on the fly) and now everybody uses this approach?
I would assume that the approach with generated code would be faster then the one that uses reflection.