[jdom-interest] Fast Factory

Jason Hunter jhunter at acm.org
Mon May 26 14:47:13 PDT 2003


> One of the problems with FastFactory as written, and extending JDOM objects
> in general, is it depends heavily on protected fields. 

That's true.

> Maybe it's time
> to make all inner fields private and put protected static constructor methods
> in all JDOM classes (damn, there goes that method count up again :(  

Perhaps, but for the org.jdom classes I felt pretty comfortable with the 
protected methods we expose.  It's the IO packages that have the odd 
exposures.

> The 
> creation methods can skip verification, but the normal constructors
> and set* methods would still call Verifier (guess they could even be made
> final).  Sort of a compromise, quick creation for those special cases like
> building from SAX, otherwise verify on normal creation or any changes
> to a object.
> 
>     Attribute.create(String localName, String value, int type,
>                      Namespace namespace)

I think this seems like quite a complication if the benefit is only a 
bit of performance.

-jh-




More information about the jdom-interest mailing list