byte-buddy
byte-buddy copied to clipboard
Add annotation for Advice to annotate placeholder methods in the same class
It should be possible to annotate methods in the class of an advice class that are used to represent another available method such as a private method or a super method that cannot be represented in the template byte code. For example:
class MyAdvice {
@Advice.OnMethodEnter
static void advice(@Advice.This Foo self) {
somePrivateMethod(self, "abc");
}
@Advice.Substitute(target = Foo.class, name = "bar")
static void somePrivateMethod(Foo self, String arg) { }
}