Get additional methods when methods enhanced by ByteBuddy
In my code, I have two classess JsonStringProcessData and StringProcessData. JsonStringProcessData is a sub class of StringProcessData.
`public class StringProcessData {
public void process(String data) {
}
public String filterData(String data) {
return data;
}
}`
`public class JsonStringProcessData extends StringProcessData {
public String parseToJSONString(String data) {
return data;
}
}`
ByteBuddy enhanced JsonStringProcessData's methods by MethodDelegation.
Before enhanced by ByteBuddy, the result of JsonStringProcessData.class.getDeclaredMethods() is public java.lang.String com.pdd.service.trade.doomdemo.service.impl.JsonStringProcessData.parseToJSONString(java.lang.String) 。
After enhanced by ByteBuddy, the result contains methods from parent class and Bytebuddy. The following img is the enhanced result of JsonStringProcessData.class.getDeclaredMethods().

So, how to get the origin methods without parent methods and deletaged methods .
Thanks .
That's an adjustment that BB needs to make. If you want a reference to the original method, you can use @SuperMethod on a parameter of your delegation.