How can I find out through reflection what is the string name of the method?
For example given:
class Car{ public void getFoo(){ } }
Wait, since you already know the method name, can't you just type it as a string?
Instead of (pseudo) Class.methodName.toString(), just use "methodName".
Class.methodName.toString()
"methodName
Otherwise you can use Class#getDeclaredMethods() to get all the methods in a class
Class#getDeclaredMethods()