This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes getMethod Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "getMethod" Watch "getMethod" New topic
Author

getMethod

sun par
Ranch Hand

Joined: Oct 03, 2002
Posts: 257

I understand thru the api that name refers to method name, but what is the purpose of parameterTypes??
Thanks


Sunita<br />SCJP 1.4
Mark Fabrizio
Greenhorn

Joined: Mar 31, 2003
Posts: 7
I'm not sure, but I think that the Class[] parameters array is to distinguish between methods that might have the same name, but different arguments. I'm not sure if these have to be in the order declared in the method or not.
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4442
    
    5

Yes, they are; and yes, they do.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: getMethod
 
Similar Threads
java. lang .reflection .Method .invoke()
Calling Methods with strings??
Reflection
getMethod(); - reflection problem
reflection - invoking Methods by Name!!!