{quote:m4ktub} You can do amazing things at that level but do you really should/want to be doing that? {quote} Most of the times - not to say always - you don't want to get your hands dirty in those ~~hackish~~ low level details. __But__, I think that to fully understand a programming language it's important not only for you to feel comfortable with the high level abstractions but also, to understand what's under the hood in a lower level (maybe it's just me). Notice, that I'm not saying that we should be developing "down there", just saying that we should have an idea of what's happening "down there". My main motivation to actually spend some time playing with bytecode injection was mostly to understand things related with AOP since it's heavily based on code injection. But notice that I, for sanity reasons, also didn't choose the most hardcore bytecode manipulation libraries such as ASM but rather javassist, because I didn't want to get ~~that~~ low level. So I think I can say that still on the light side;-) {quote:m4ktub} That is actually quite interesting but, once again, lets focus on the ends instead of focusing on the means. We want to change classes in a way that is not supported by the Java language, nor natively by the JVM, when they are loaded. But why? Why during the loading phase? {quote} Can I answer "because I can"? :-) I mentioned it mostly because I thought it was an interesting concept, although in my opinion, it's not usable in production environments mostly because it's too slow. I do think every programming language has it's expressive problems - I say all because there is no perfect language - but I don't think we can solve Java problems with bytecode injection. \\ To me the biggest problem in java is not having native support to add and remove things from the class interface at runtime, such problem, can't be solved with bytecode injection. I do know you can always implement {link:MetaObjectProtocol|url=http://en.wikipedia.org/wiki/Metaobject} to solve partially this problem but that's another story.