Earlier I was wondering how to distinguish between classes I needed to instrument and those that are in the runtime and thus assumed to have been instrumented correctly already. This is easier than I thought: If a file cannot be loaded through some other means, there is a special method findSystemClass
to load system classes. I’ll only instrument classes loaded through other means, e.g. directly from a class file. A “do not instrument” annotation might still be useful, though.