commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Schofield" <>
Subject Re: [digester] i'd like to contribute - here's my new feature idea
Date Thu, 12 Dec 2002 21:27:31 GMT
So what if I wrote a patch to deal with this limitation (I described such a patch in an earlier
reply but it didn't seem to make it to the list).  The patch would be as follows:

- Add a no-argument constructor to ObjectCreateRule
- Modify the begin() method of ObjectCreateRule so that if there is no classname and no name
for an attribute for the classname (as would be the case if you used the no-arg constructor),
then use the first attribute (if available) as the classname.  If that's not available then
just continue on and let the existing exception handling take over.
- Modify Digester by adding an 'addObjectCreate(String pattern)' method that would create
the rule using the new no-arg constructor for ObjectCreateRule

What do you guys think?  I'd like to write the patch if it sounds agreeable to the group.



>hi sean
>(if i've understood you right) then i think that this functionality exists 
>already (or very nearly does).
>take a look at the ObjectCreateRule(String classname, String attributeName)
>. this will create an object who class name is given in an attribute of 
>the xml. at the moment, you have to specify a class name (which is used as 
>a default class to construct if the attribute isn't present) but it should 
>be very easy to create a patch which eases this restriction.
>but don't let that put you off if you think you have a better solution.

[... snip ...]

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

View raw message