Lets say there is a method
public int getSize() {
return 3;
}
No other method calls this method in the java code.
I have written a java agent using bytebuddy, but AFAIK it only gives the capability to intercept a method call. Hence i can not intercept the method and capture the return value.
From my java agent, I want to scan all the methods with a annotation and call them. what are the ways to do this?