raphw / raphw/byte-buddy

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

Open
#484 0 comments 2 reactions 1 assignee View on GitHub

@raphw is already working on this.

Since Jun 3, 2018.

enhancement
Dominant language
Java
Stars
6.9k
Forks
855
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.