开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜