我正在尝试查找调用方方法的方法签名。我需要这样做,因为我正在编写的代码被混淆并且很多方法被重载。我试图忽略来自具有签名的某个方法的调用目前我的代码看起来像这样
StackTraceElement caller = Thread.currentThread().getStackTrace()[2];
String cn = caller.getClassName();
String mn = caller.getMethodName();
if(cn == "net.minecraft.client.Minecraft" && (mn == "displayGuiScreen" || mn == "a")){ // displayGuiScreen is for non-obfuscated, a is for obfuscated. Doesn't work because 2 other methods that call it are also called a when obfuscated
System.err.println("Skipped");
return;
}
谁能帮我这个?谢谢