Can i insert Bytecode inside my source code?
Can i write bytecode inside 开发者_如何学编程a method of a class so that the compiler bypasses that part since it is already compiled. Something similar to writing assembly programs in C language using "asm"...
I think you mean Java. If that's the case:
Short answer: no.
Long answer:
There is nothing like asm { ... }
in Java. But you could (not very clever in most situations) write a .class
file (or have bytecode in textual representation and then assemble it in Java to a .class
file) from Java and dynamically load and execute it.
精彩评论