Add annotation for Advice to annotate placeholder methods in the same class

Author: raphwCreated Jun 3, 2018Updated Jun 3, 2018
Labelsenhancement

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:

java
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) { }
}