[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: finding method efficiently

From: Artur Biesiadowski
Subject: Re: finding method efficiently
Date: Tue, 28 Sep 2004 23:18:38 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113

Archie Cobbs wrote:

I have come across this same challenge several times now, i.e.,
having to write code that implements the Java "best match" semantics
for method invocation using reflection. Usually I end up doing something
that works in all the 'easy' cases and punt on the rest.
So it would be nice if we could write this algorithm once and for all
and make it public somewhere :-)

chooseMethod(String methodName, List methods, Class[] arguments, boolean coerce)

I don't know sure good it is in practice, but it seems to cover most cases including wrapped primitives.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]