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”…
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.classfile (or have bytecode in textual representation and then assemble it in Java to a.classfile) from Java and dynamically load and execute it.