class A extends B{
public void a(){
super.a();
System.out.println("hello");
}
}
I want to use javassist to insert some codes after super.xxx, for example:
class A extends B{
public void a(){
super.a();
System.out.println("inject");
System.out.println("hello");
}
}
if origin codes do not contain super.xxx, then just enter the method for using the .inertBefore code.
My question is how to determine if the method contains "super.xxx" and how can I embed codes as described above.
source
share