commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitri Plotnikov <dplot...@yahoo.com>
Subject Re: [reflect] Method lookup
Date Mon, 17 Jun 2002 20:16:18 GMT
Robert,

I agree with you completely.  The only issue is that even though
introspection in BeanUtils is perfect in terms of quality, it may not
address some of the functional requirements other projects have for
introspection.  For instance, JXPath needed its own version because of
the specifics of InfoSet type conversions, the special status of
ExpressionContext, the need to support DynamicPropertyHandler and some
other issues.

I believe the existence Reflect project is warranted if it can in fact
be reused across all these projects with their specific requirements.

The fact that BeanUtils has been so thorougly tested makes it a perfect
source of information (and code) for Reflect.

- Dmitri


--- robert burrell donkin <robertdonkin@mac.com> wrote:
> 
> 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>
> 


__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.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>


Mime
View raw message