0

I search way to get all the names of a function in java. for example:

public String doSomething(String user, boolean tree, String[] arr){
// HERE I want to get all the names of the params, meaning: user, tree and arr, and do something with them
}

How can I do it?

user2490373
  • 153
  • 1
  • 2
  • 11
  • http://stackoverflow.com/questions/2237803/can-i-obtain-method-parameter-name-using-java-reflection – SubSevn Aug 21 '13 at 14:55

1 Answers1

0

You can, but only if you have debugging information in the code. The names of these variables exist mainly for you, not for the processor.

Details here:

Can I obtain method parameter name using Java reflection?

Community
  • 1
  • 1
SubSevn
  • 1,008
  • 2
  • 10
  • 27