Can i insert Bytecode inside my source code?
-
24-09-2019 - |
문제
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.
제휴하지 않습니다 StackOverflow