How can I get the name of a method just like I can get the name of a class? (RandomClass.class.getName())
Hardcoding won't work because the obfuscator destroys it.
Reason: I'm injecting methods like this:
MethodNode getLocalPlayer = GetterAdapter.insert(false, true, "getLocalPlayer", "Lvanquish/accessors/Player;", "client", "yD", "LQZ;");
classNode.methods.add(getLocalPlayer);
//class client implements my interface which contains the method getLocalPlayer
public interface Client {
public int[] getPlayerIndices();
public Player getLocalPlayer();
public Player[] getPlayers();
public int getBaseX();
public int getBaseY();
public int getCameraX();
public int getCameraY();
}
//when I obfuscate my files getLocalPlayer get's a name like a2
//when you look above you see that the method name was hard code and so
// will it create an error
Declared method wont work here, because I don't know the method name and there are like 4 vars of the same type.
Would this work or would it be a mess?
@DataMap.varDetails(name = "getPlayerIndices")
public int[] getPlayerIndices();