Rafael Winterhalter

Results 738 comments of Rafael Winterhalter

You will have to modify the classes that access the field for this. `MemberSubstitution` offers facilities for that. You could for example add a method call to a tracking method...

You should be able to simply return void, the chain value is not used in your example. As long as you end with a call to the original expression.

It seems like the annotations are not visible on the specified method. Could you check using reflection yourself?

You need to match `ElementMatchers.isTypeInitializer()` as a target. You would then need to match a constructor for `ClassB` and probably define a replacement chain where you first replace the argument...

It is, but likely it would be best to use ASM. Alternatively, you can use `AnnotationRemoval` and then add a new annotation. This might however be more costly than necessary...

Lambda metafactory is not really possible on modern JVMs anymore. I will likley deprecate the function. Rather, instrument the classes that contain the lambdas, where the logic will be contained...

Might it be that you are intercepting static methods? That would not allow to be bound. You can also remove parameters and add them incrementally to see why it does...

Does it still throw the exception? Possibly, you should use `Advice` for this, if you want to use retransformation. This is more flexible for this purpose, and is a good...

This means that the plugin cannot find the `androidx/room/RoomDatabase.class` from the class loader / environment. Is this class file available?

But if the class file available? classLoader.getResourceAsStream("androidx/room/RoomDatabase.class") should return a value.