51 * point we used to have ParentNode inheriting from NodeImpl and another class
52 * called ChildAndParentNode that inherited from ChildNode. But due to the lack
53 * of multiple inheritance a lot of code had to be duplicated which led to a
54 * maintenance nightmare. At the same time only a few nodes (Document,
55 * DocumentFragment, Entity, and Attribute) cannot be a child so the gain in
56 * memory wasn't really worth it. The only type for which this would be the
57 * case is Attribute, but we deal with there in another special way, so this is
58 * not applicable.
59 * <p>
60 * This class doesn't directly support mutation events, however, it notifies
61 * the document when mutations are performed so that the document class do so.
62 *
63 * <p><b>WARNING</b>: Some of the code here is partially duplicated in
64 * AttrImpl, be careful to keep these two classes in sync!
65 *
66 * @xerces.internal
67 *
68 * @author Arnaud Le Hors, IBM
69 * @author Joe Kesselman, IBM
70 * @author Andy Clark, IBM
71 * @version $Id: ParentNode.java,v 1.6 2009/07/21 20:30:28 joehw Exp $
72 */
73 public abstract class ParentNode
74 extends ChildNode {
75
76 /** Serialization version. */
77 static final long serialVersionUID = 2815829867152120872L;
78
79 /** Owner document. */
80 protected CoreDocumentImpl ownerDocument;
81
82 /** First child. */
83 protected ChildNode firstChild = null;
84
85 // transients
86
87 /** NodeList cache */
88 protected transient NodeListCache fNodeListCache = null;
89
90 //
91 // Constructors
|
51 * point we used to have ParentNode inheriting from NodeImpl and another class
52 * called ChildAndParentNode that inherited from ChildNode. But due to the lack
53 * of multiple inheritance a lot of code had to be duplicated which led to a
54 * maintenance nightmare. At the same time only a few nodes (Document,
55 * DocumentFragment, Entity, and Attribute) cannot be a child so the gain in
56 * memory wasn't really worth it. The only type for which this would be the
57 * case is Attribute, but we deal with there in another special way, so this is
58 * not applicable.
59 * <p>
60 * This class doesn't directly support mutation events, however, it notifies
61 * the document when mutations are performed so that the document class do so.
62 *
63 * <p><b>WARNING</b>: Some of the code here is partially duplicated in
64 * AttrImpl, be careful to keep these two classes in sync!
65 *
66 * @xerces.internal
67 *
68 * @author Arnaud Le Hors, IBM
69 * @author Joe Kesselman, IBM
70 * @author Andy Clark, IBM
71 */
72 public abstract class ParentNode
73 extends ChildNode {
74
75 /** Serialization version. */
76 static final long serialVersionUID = 2815829867152120872L;
77
78 /** Owner document. */
79 protected CoreDocumentImpl ownerDocument;
80
81 /** First child. */
82 protected ChildNode firstChild = null;
83
84 // transients
85
86 /** NodeList cache */
87 protected transient NodeListCache fNodeListCache = null;
88
89 //
90 // Constructors
|