[jdom-interest] Factories for builders.

Richard Cook rpc at prismtechnologies.com
Wed Mar 14 09:04:19 PST 2001

I think this will be a nice addition to JDOM capability.

only a few very minor points

1. is there any value in having more lightweight interfaces (eg
ElementFactory, AttributeFactory) and JDOMFactory interface implements all
of them. This means I can use ElementFactory wherever I need such an
interface plugin but don't want to implement the whole JDOMFactory (though I
don't think this is of any value within JDOM itself).

2. Should the factory contain only a minimal set of methods - eg
Element(String,Namespace) rather than duplicate all constructors.

3. You could save a possible redundant creation of DefaultJDOMFactory by
putting it in a lazy initialiser

4. Should the doc include what it means to return null from a factory method
(presumably not allowed?)

thanks, richard

> -----Original Message-----
> From: jdom-interest-admin at jdom.org
> [mailto:jdom-interest-admin at jdom.org]On Behalf Of Ken Rune Helland
> Sent: Tuesday, March 13, 2001 12:39 PM
> To: jdom-interest
> Subject: [jdom-interest] Factories for builders.
> Here is an attemt to implement factories for builders.
> I have kept it simple.
> D:\JDOM\factorySAXBuilder.diff a diff for SAXBuilder based on
> fridays source drop.
> JDOMFactory.java is the java interface defining the factory.
> DefaultJDOMFactory.java is the default implementtation used by
> saxbuilder when nothing is set with the SAXBuilder.setFactory
> metod.
> Best Regards
> KenR

More information about the jdom-interest mailing list