Rahul.v Joshi

Greenhorn
+ Follow
since Sep 20, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Rahul.v Joshi

Hi,
I have to reactor code written using switch case. The scenario is as:
case 1:
reset some instance vars of a class , class has many instance vars
case 2:
reset some instance vars of a class , class has many instance vars
case 3:
reset some instance vars of a class , class has many instance vars
case 4:
reset some instance vars of a class , class has many instance vars
.
.
.
case 20:
reset some instance vars of a class , class has many instance vars


Can anyone suggest an optimal way to replace this procedure oriented logic using OOPS concepts/patterns.
Thanks,
-Rahul.
I know (at lease till java 5.0) compiler doesnt store method parameter names in class file and we cant retrieve it using reflection.
But I want to get method parameter names can any one tell me any way to do it..or point to any utility (open source) to do the same may be by parsing java file.

what I want is like...

String[] getMethodParams(java.reflection.Method method)

it should return me all the parameter names for this method.

Thanks in advance

~Rahul.
16 years ago