Right, Hibernate
could likely benefit from code generation, though the profit might not be as big as you suppose.
- First of all, Reflection uses bytecode generation under the hood and it is not too slow.
- You can't do some sort of things using bytecode generation only. E.g. reflection allows you to access private fields and to invoke private methods, while it is not possible with bytecode generation (unless you use certain non-portable hacks).