Hello everybody, I re-read the API documentation for *java.lang.instrument.Instrumentation*over and over again, but I could not figure out what the (main) difference is between the methods *redefineClasses* and *retransformClasses*.
Imagine I have multiple agents that (re)transform the bytecode of the same class. By using *retransformClasses* the current definition of the class is passed to the transform method. But could not I also read the current class file bytes and instrument them, e.g. by using a bytecode manipulation library, *before *I pass these bytes to *redefineClasses*? Hence, what can I do with *retransformClasses* that I cannot also do with * redefineClasses*? Or is *retransformClasses* actually "API sugar"? When would I use what method? Thank you very much in advance, Bastian Helfert
