How to convert in-memory Class to bytecode byte[]?
Hi,
I have a class definition which does not exist on disk and I want to send this over the wire to another JVM which does not know about it ahead of time. How do I take a class definition, and dump its bytecode to byte[]?
Give a Class object I know I can serialize it to a byte[] but my understanding is that the serialized form of a Class object is not the same thing as the bytecode for a class definition. Any ideas?
Thanks,
Gili