[jdom-interest] Factories

Bradley S. Huffman hip at cs.okstate.edu
Sat Feb 28 20:16:59 PST 2004

Elliotte Rusty Harold writes:

> At 2:06 PM -0600 2/28/04, Bradley S. Huffman wrote:
> >I'm agree with Elliotte in that it would be nice to have it hidden,
> >unfortunately Java's package system doesn't allow it.
> Why doesn't it? XOM hides its equivalent of this class.

Because most everything in XOM is in the same package, nu.xom.

To skip verification UncheckedJDOMFactory directly sets the protected, or
class protected variables in the core classes and to do that it must be in
the same package (org.jdom). SAXHandler/SAXBuilder are in org.jdom.input,
for them to use this factory it must be public and it's methods must be
public.  If SAXHandler/SAXBuilder where in org.jdom, you bet, we would of
done what XOM does along time ago.

IIRC, Laurent tried two years ago to trick Java by having internal classes
in SAXHandler that extended the core classes, but it did work out.


More information about the jdom-interest mailing list