I\'m working on a coremod for Minecraft, and transform a lot of the classes as they are loaded. The problem however is that there are multiple coremods which also transform the
As far as I know, the only interface for runtime access to bytecode is provided by Java Agents. This is also how you create classfile transformers in the first place, so you should already be using one. Just modify it to dump the classfile.
Edit: As far as the order of transformation, according to the docs, it is
Retransformation incapable transformers
Retransformation incapable native transformers
Retransformation capable transformers
Retransformation capable native transformers
So ideally you'd want a retransformation capable native transformer. But writing native code is a pain. Setting your transformer to enable retransformation will help a lot, but it's still possible for another retransformer registered later to run after you. The best option I can think of is to register your agent again. Or find all calls to register a transformer and insert yours afterwards.