commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert burrell donkin <>
Subject Re: Digester SetNext rule and Interfaces ...
Date Fri, 05 Apr 2002 10:29:56 GMT
hi greg

digester's behaviour has recently been enhanced in this area. i'll discuss 
the older stuff first but i'll come back to the enhancements before the 

SetNextRule (and other rules like it) has two different usage patterns.

1. you can pass in just a method name and digester will try to find a 
method with the given name that accepts a parameter matching the object's 

2. you can specify the method name and the class name of the parameter 
type - in this case digester will try to find a method with the given name 
matching the given parameter type.

if you use option 2 and specify an interface name as the parameter name, i 
expect digester to find the method correctly.

that's the old way to do what you want - specifying the class name of the 
interface that the method takes.

the CVS HEAD version of digester contains extra code (relying on the 
latest version of beanutils) which finds a lot more automagic matches. 
hopefully, if your method takes an interface implemented by the object to 
be passed in then that method will now be found using case 1. in other 
words, if you upgrade to the latest beanutils and digester source then 
your problem might go away.

hope this helps.

- robert

On Friday, April 5, 2002, at 09:12 AM, Greg McCreath wrote:

> Hi all,
> I'm beavering away with Digester and have a question.  The SetNext rule
> takes sends a method to the top-but-one object on the stock passing as a
> parameter the top object.  It is looking for a method signature that uses
> the top object class as a parameter ... but ... what if the method 
> signature
> is expecting an interface and not a specific class?  Digester seems to not
> cater for this.  Am I correct?  Is there a workaround?
> Many thanks
> Greg.
> --
> 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:   <>
For additional commands, e-mail: <>

View raw message