Given that class loaders accept to take as input a byte array of a given class, returning a Class>, I wonder whether it is possible to do the reverse, t
Here's something to try with BCEL:
JavaClass clazz = Repository.lookupClass("foo.bar.YourClass");
byte[] bytes = clazz.getBytes();
I didn't know the answer prior to reading your question, but I knew I should check the following libraries, because they support the Java class file format:
If the above doesn't work, look for something else in these libraries.