[jdom-interest] protected ContentList in Document

Elliotte Rusty Harold elharo at metalab.unc.edu
Thu May 2 16:01:10 PDT 2002


The org.jdom.Document class has this protected field:

    protected ContentList content = new ContentList(this);

However, the ContentList class is package private so this field isn't 
truly accessible to subclasses. I think we should either

1. Make the content field private (My preferred option)
2. Make ContentList a public class
3. Declare the content field to have type List rather than ContentList

The protected attributes and content fields in the Element class have 
the same issues:

    /** The attributes of the <code>Element</code>. */
    protected AttributeList attributes = new AttributeList(this);

    /** The mixed content of the <code>Element</code>. */
    protected ContentList content = new ContentList(this);

-- 
+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo at metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+ 
|           The XML Bible, 2nd Edition (IDG Books, 2001)             |
|             http://www.cafeconleche.org/books/bible2/              |
|   http://www.amazon.com/exec/obidos/ISBN=0764547607/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