A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Android Security Essentials Live Lessons
this week in the
Java in General
Joined: Oct 03, 2002
Apr 01, 2003 07:28:00
public Method getMethod(String name, Class parameterTypes) throws NoSuchMethodException, SecurityException
I understand thru the api that name refers to method name, but what is the purpose of parameterTypes??
Sunita<br />SCJP 1.4
Joined: Mar 31, 2003
Apr 01, 2003 07:44:00
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.
Joined: Feb 26, 2001
Apr 01, 2003 07:46:00
Yes, they are; and yes, they do.
I agree. Here's the link:
java. lang .reflection .Method .invoke()
Calling Methods with strings??
getMethod(); - reflection problem
reflection - invoking Methods by Name!!!
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014