Rafael Winterhalter

Results 738 comments of Rafael Winterhalter

I already answered you on StackOverflow: https://stackoverflow.com/questions/78849628/how-to-create-a-class-with-updated-private-field-using-bytebuddy/78854737#78854737

The idea of the warump strategy is that it executes the code of the ClassFileTransformer in each expected way. Ideally in form of a transformed class, an ignored class and...

I hopefully avoid this in the circularity lock now which hopefully loads all relevant classes during construction from now on.

Indeed, I did not dig into the code, but obviously not all relevant methods will be resolved. It is however difficult to anticipate the dependency graph statically as the JVM...

You can create a static fake method with the same signature and then use MethodSubstitution to replace the method with the actual one.

You can emulate a self-invocation. As you already discovered you can skip a method using `skipOn` in enter. You can also repeat a method from an exit advice using `repeatOn`....

You should concatenate the agent builder and only install it a single time after the loop. The transformations are additive by default.

The fewer classes are transformed, the better. But retransforming is in itself expensive, so this reduces iterations by a lot.

Byte Buddy implements an immutable builder, there should be no side effects. Maybe the weaver fails as you refer to the loaded MyPrinter class? You can use a TypePool to...