Is there any way to make a sort of "supermethod" that is called every time a method is called, even for non-defined methods? Sort of like this:
public void onStart() {
System.out.println("Start");
}
public void onEnd() {
System.out.println("End");
}
public SuperMethod superMethod() {
System.out.println("Super");
}
// "Start"
// "Super"
onStart();
// "End"
// "Super"
onEnd();
// "Super"
onRun();
Edit - Specifics: I have a library that updates a lot and gets reobfuscated on each update. To make my workflow easier I am making my program automatically update the library (required to do what I want it to do, I won't go that specific on why, but my program will work with future updates) and I have the obfuscation mappings download with the library, I want to make a sort of proxy called Library
for example and then when I call Library.getInstance()
it will get the obfuscation mapping for getInstance()
and call the library's method getInstance()
or abz
as it is mapped to at this current moment in time.