Attached is the MethodMap.java that in its find() method uses the algorithm specified in JLS for finding the most specific applicable method among overloaded methods for given actual parameter types. (with the known caveat that it can't distinguish object from primitive types (ie. java.lang.Integer from int) since -- this being reflection -- it always recieves object, and never primitive parameters. Therefore, the
foo(Integer i) and foo(int i) method signatures are ambigous when foo is called with a java.lang.Integer. We could discuss whether we optionally favor primitive over object types (or other way round) in this case instead of declaring ambiguity. I've run the test suite against the new code (with special attention to IntrospectorTestCase and IntrospectorTestCase2), and after several trivial bugfixes it now works correctly. To be completely frank, the template encoding test actually failed but I don't think it has to do anything with my code. It needs review from a committer (and hopefully a commit). BTW, what on the Earth is a Twonk? -- Attila Szegedi home: http://www.szegedi.org
MethodMap.zip
Description: Zip compressed data
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
