Thanks Craig.  I did, in the meantime, just created my own rule that calls 
my factory method.  Not as elegant as what you're doing.  Thanks, again...Tom

At 05:05 PM 8/27/01 -0700, you wrote:


>On Fri, 24 Aug 2001, Tom Tibbetts wrote:
>
> > Date: Fri, 24 Aug 2001 09:52:30 -0500
> > From: Tom Tibbetts <[EMAIL PROTECTED]>
> > Reply-To: [EMAIL PROTECTED]
> > To: [EMAIL PROTECTED]
> > Subject: Digester and Factory methods
> >
> > Greetings.  I'm using the digester to read a poor-person's DB and am
> > wondering if there is a way for the digester to call my own factory methods
> > for creating objects instead of using the Digester's addCreateObject
> > method.  If there was a way of registering factory methods for object
> > creation, that would be way cool.  Thanks, Tom Tibbetts
> >
>
>The current development branch of Digester in the jakarta-commons project
>has just such a feature -- there is a new rule type called
>FactoryCreateRule, to which you pass an object that implements
>ObjectCreationFactory.  This works wonders, for example, when you need to
>instantiate an object that does not have a zero-args constructor, or where
>you *must* call an underlying factory method to create the thing, instead
>of Class.newInstance().
>
>Craig

Reply via email to