[jdom-interest] Re: Factories for Element creation
Elliotte Rusty Harold
elharo at metalab.unc.edu
Fri Nov 3 12:07:40 PST 2000
At 10:23 AM +0100 11/2/00, Thomas Koch wrote:
>We are using a modified SAXBuilder to accomplish approximately what
>has been discussed earlier and that approach seems to work just fine.
>
>The private SAXBuilder is not optimal from the maintenance perspective,
>but it is not too complex in its current form. An element factory hook
>could improve this, but you might need other modifications to SAXBuilder
>in addition to that, such as processing attributes etc.
>
>However, we have encountered one problem when subclassing Element:
>the final toString() method (which we would like to override).
>Is there a chance to change that?
>
We originally made it final to prevent people from using it instead
of getSerializedForm(). toString() is for debugging only.
Here's my question to you: why do you want to subclass it? What's
wrong with the existing behavior? What use-case do you have for which
the current implementation of toString() fails you? What do you want
to change about this method?
--
+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
| The XML Bible (IDG Books, 1999) |
| http://metalab.unc.edu/xml/books/bible/ |
| http://www.amazon.com/exec/obidos/ISBN=0764532367/cafeaulaitA/ |
+----------------------------------+---------------------------------+
| Read Cafe au Lait for Java News: http://metalab.unc.edu/javafaq/ |
| Read Cafe con Leche for XML News: http://metalab.unc.edu/xml/ |
+----------------------------------+---------------------------------+
More information about the jdom-interest
mailing list