commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert burrell donkin <>
Subject Re: [BeanUtils] invokeExactMethod() --> invokeMethod() ?
Date Mon, 11 Feb 2002 23:16:25 GMT
On Monday, February 11, 2002, at 09:29 PM, Bart Guijt wrote:

> Hello BeanUtils committers,

hi bart

> In december there was a discussion concerning about the invokeExactMethod(
> ) in the MethodUtils class. There were plans to impkement a not-so-exact 
> invokeMethod() method which matches compatible method signatures.

you're right that the reason i called it invokeExactMethod was that i 
wanted to leave space for a 'fuzzier' invokeMethod. i had plans but i got 
sidetracked. i can't speak for other people but if i do implement it, it 
won't be for a while yet.

> One suggested to look into the Velocity code.

as i recall, i took a look at the velocity code at the time. it has some 
interesting features but would take work to refactor it into a form 
suitable for inclusion in an independent component.

> Right now we need to use this particular feature using the commons 
> Digester.

do you have a concrete example? i might be able to suggest how you could 
achieve what you want without requiring this change.

> 1. Does anybody know where exactly in the Velocity codebase this code can 
> be found?

implementing a fuzzier invokeMethod from scratch isn't difficult in any 
case. i had intended to do so but i'm pretty sure that i had a reason 
(which made sense to me at least) not to. if i remember correctly, care 
would have to be taken not to introduce a subtle break in backwards 
compatibility (digestions that relied on the fact that a method could not 
be found could break).

> 2. I already took a leap to implement a method 
> 'getMatchingPublicMethod(Class clazz, String methodName, Class[] 
> paramTypes)' which returns the correct method and is called from the 
> 'getAccessibleMethodFromInterfaceNest()' method. This seems to work, aka 
> the tests don't fail. Since this change defuses the 'invoke*Exact*Method(
> )' semantics, is this the right solution? It seems either the methods 
> need to be renamed or the Digester code needs to be adjusted to call a 
> new 'invokeMethod()'.

i'm a bit confused by this paragraph. if you're proposing a patch then i'd 
find your logic easier to follow if you could supply a cvs diff -u.

- robert

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message