[jdom-interest] Factories for builders.
Steven D. Keens
skeens at planetfred.com
Fri Mar 9 10:34:57 PST 2001
Will it be only building Elements? What about attributes,
processing instructions, and all of the other XML objects?
I don't think we should call it an ElementFactory. I
think maybe XMLFactory or something else.
From: jdom-interest-admin at jdom.org
[mailto:jdom-interest-admin at jdom.org]On Behalf Of Paul Philion
Sent: Friday, March 09, 2001 12:29
To: jdom-interest at jdom.org
Subject: RE: [jdom-interest] Factories for builders.
I always prefer an interface (call it ElementFactory, for example) and a
default implementation (DefaultElementFactory). SaxBuilder could have either
a setElementFactory or an additional set of constructors (each having an
extra parameters: ElementFactory). Typical behavior would be to subclass
DefaultElementFactory and override the specific behaviors that you need.
- Paul Philion
> -----Original Message-----
> From: jdom-interest-admin at jdom.org
> [mailto:jdom-interest-admin at jdom.org]On Behalf Of Ken Rune Helland
> Sent: Friday, March 09, 2001 12:14 PM
> To: jdom-interest
> Subject: [jdom-interest] Factories for builders.
> Hello all.
> On monday I will rewrite SaxBuilder to
> accept a factory to enable building of JDom
> trees with subclasses of the JDOM classes.
> I will of course post the modified SaxBuilder
> to the project for evaluation for inclusion
> into the main code.
> My current plan is to create an interface with
> methods matching the public constructors of the
> jdom classes and supply SaxBuilder with a default
> implementation that serves the original JDOM
> Does anyone have any ideas and suggestions for
> a better approach?
> Especially am I wondering if the Factory should be
> a class or interface, is there any pros and cons?
> Best Regards
> To control your jdom-interest membership:
> dr at yourhost.com
To control your jdom-interest membership:
More information about the jdom-interest