>>>>> "Robert" == Robert Schuster <[EMAIL PROTECTED]> writes:
Robert> Now when evaluating the XML data I have to search the method "put" Robert> which accepts the two arguments. Having Robert> only String and JFrame as argument types means that the call to Robert> HashMap.class.getMethod("put", new Class[] { String.class, Robert> JFrame.class }); Robert> will fail. My current naive approach to find HashMap.put(Object, Robert> Object) is to generate a long list of a superclasses and Robert> interfaces of all arguments and then calling getMethod("put", ..) with Robert> every combination. You could use Class.getMethods to get an array of all methods in a class, then search for the method that allows this call, by using isAssignableFrom on the arguments. That's about all I can think of. This is more efficient than using getMethod since you don't need to generate all combinations of the method argument types. getMethods will look at the inheritance tree for you, so you only need to call it once. Tom _______________________________________________ Classpath mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/classpath