commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert burrell donkin <robertdon...@mac.com>
Subject Re: [reflect] Method lookup
Date Mon, 17 Jun 2002 19:25:10 GMT

On Monday, June 17, 2002, at 04:22 PM, James Strachan wrote:

> Also take a look at MethodUtils in beanutils.

there are quite a few wrinkles when you use introspection for reflection. 
though it's not perfect, the basic methods in the beanutils package have 
had a lot of bugs fixed and have been tested in the wild.

it'd be a shame for a replacement package to have bugs in which have 
already been fixed in the component that it's intended to replace.

- robert

> James
> ----- Original Message -----
> From: "Stephen Colebourne" <scolebourne@btopenworld.com>
> To: "Jakarta Commons Developers List" <commons-dev@jakarta.apache.org>
> Sent: Monday, June 17, 2002 1:26 AM
> Subject: Re: [reflect] Method lookup
>
>
>> I haven't looked at it (yet) but it is one method that I would consider 
>> to
>> be high on the list for inclusion
>>
>> Stephen
>>
>> ----- Original Message -----
>> From: "Dmitri Plotnikov" <dmitri@apache.org>
>> To: "Jakarta Commons Developers" <commons-dev@jakarta.apache.org>
>> Sent: Monday, June 17, 2002 12:39 AM
>> Subject: [reflect] Method lookup
>>
>>
>>> Here's something that might belong in reflect.  Check out this class:
>>>
>>>
>>
> http://jakarta.apache.org/commons/jxpath/xref/org/apache/commons/jxpath/util
>>> /MethodLookupUtils.html
>>>
>>> I know, I know, it could benefit from a lot more javadoc and I will add
> it
>>> soon.
>>>
>>> The basic idea of MethodLookupUtils is that it performs dynamically the
>> type
>>> of method lookup that a Java compiler does statically.
>>>
>>> For example, let's say I have this class:
>>>
>>>     class Foo {
>>>       void bar(int x);
>>>       void bar(String y);
>>>     }
>>>
>>> Then,
>>>
>>>     Method method = MethodLookupUtils.lookupMethod(Foo.class, "bar", new
>>> Integer(3));
>>>
>>> will perform a method lookup based on the class, method name, argument
>> types
>>> and, if there is no exact type match, on _convertability_ of the
> arguments
>>> to the parameter types.
>>>
>>> MethodLookupUtils are used by JXPath to choose among extension
> functions.
>>>
>>> Just another drop in the pool of ideas.
>>>
>>> - Dmitri
>>>
>>>
>>> --
>>> To unsubscribe, e-mail:
>> <mailto:commons-dev-unsubscribe@jakarta.apache.org>
>>> For additional commands, e-mail:
>> <mailto:commons-dev-help@jakarta.apache.org>
>>>
>>
>>
>> --
>> To unsubscribe, e-mail:
> <mailto:commons-dev-unsubscribe@jakarta.apache.org>
>> For additional commands, e-mail:
> <mailto:commons-dev-help@jakarta.apache.org>
>>
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> --
> To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.
> org>
> For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.
> org>
>


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message