[jdom-interest] Toward beta 9

Elliotte Rusty Harold elharo at metalab.unc.edu
Thu Apr 10 04:54:16 PDT 2003


At 10:55 PM -0700 4/9/03, Philip Nelson wrote:
>Has anybody tried this approach?
>
>create a package protected or inner subclass of DefaultJDOMFactory in
>SAXBuilder.  Then in the factory, for example...
>
>     private class NoCheckText extends Text
>     {
>        public void noCheck(String text) {
>           value = text;
>        }
>     }
>     public Text text(String text) {
>         NoCheckText t = new NoCheckText();
>         t.noCheck(text);
>         return (Text) t;
>     }


That looks like it might actually work without causing too many 
problems or further complicating the API, though it does depend on 
those protected, do-nothing, no-args constructors that I wish we 
didn't have.
-- 

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
|           Processing XML with Java (Addison-Wesley, 2002)          |
|              http://www.cafeconleche.org/books/xmljava             |
| http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA  |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
|  Read Cafe con Leche for XML News: http://www.cafeconleche.org/    |
+----------------------------------+---------------------------------+



More information about the jdom-interest mailing list