How to get string name of a method in java?
Posted
by drozzy
on Stack Overflow
See other posts from Stack Overflow
or by drozzy
Published on 2010-06-11T13:59:07Z
Indexed on
2010/06/11
14:23 UTC
Read the original article
Hit count: 160
java
|reflection
How can I find out through reflection what is the string name of the method?
For example given:
class Car{
public void getFoo(){
}
}
I want to get the string "getFoo", something like the following:
Car.getFoo.toString() == "getFoo" // TRUE
© Stack Overflow or respective owner