byte-buddy
byte-buddy copied to clipboard
How to write a method ElementMatcher only include declared method ?
For example,there are two class: ` public class Father { public void hi () {} }
public class Son extends Father { public void bye () {} }
`
How to build a ElementMatcher<MethodDescription> only include Son#bye(), thanks for your help.
You'd need a matcher for the type (assuming you are using an agent builder) and then match the method. If you know the names, you can match both by name.