[jdom-interest] making SAXOutputter extensible

Jason Hunter jhunter at servlets.com
Tue Jan 6 00:48:42 PST 2004


Any time you make internal fields of a class like SAXOutputter protected 
or public, that's a promise not to change their names or behavior in the 
future lest we break people's code.  That eliminates the benefits of 
encapsulation and is a larger promise than I think we should sign up 
for.  The real solution then is for you to just take advantage of the 
source that's distributed and make the changes yourself.  That way at 
least you understand that your code depending on SAXOutputter internals 
may break in future releases.

-jh-

PJ Fanning wrote:

> Hi,
> I've got a small enhancement request.
> I'd like to produce a subclass of SAXOutputter that destroys the document as
> it outputs it, in order to conserve memory. The current codebase does not
> allow you to extend this class. Specifically, most of the members and
> methods are private. If they were marked as protected and the NamespaceStack
> class marked as public, I would be able to achieve what I'm looking to do. 
> If there are no objections, I could forward modified versions of these two
> classes to the list.
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com
> 




More information about the jdom-interest mailing list