Methods Summary |
---|
private void | ensureAttrsCapacity(int chunk)
if (fAttrNode.length <= chunk) {
fAttrNode = resize(fAttrNode, fAttrNode.length * 2);
}
else if (fAttrNode[chunk] != null) {
return;
}
fAttrNode[chunk] = new AttrNSImpl[CHUNK_SIZE];
return;
|
private void | ensureElementsCapacity(int chunk)
if (fElements.length <= chunk) {
fElements = resize(fElements, fElements.length * 2);
}
else if (fElements[chunk] != null) {
return;
}
fElements[chunk] = new ElementNSImpl[CHUNK_SIZE];
return;
|
private void | ensureTextCapacity(int chunk)
if (fTextNode.length <= chunk) {
fTextNode = resize(fTextNode, fTextNode.length * 2);
}
else if (fTextNode[chunk] != null) {
return;
}
fTextNode[chunk] = new TextImpl[CHUNK_SIZE];
return;
|
public final com.sun.org.apache.xerces.internal.dom.AttrNSImpl | getAttrNode()This methods creates attribute node or provides a free
attribute node if such exists in the pool.
int chunk = fAttrNodeIndex >> CHUNK_SHIFT;
int index = fAttrNodeIndex & CHUNK_MASK;
ensureAttrsCapacity(chunk);
if (fAttrNode[chunk][index] == null) {
fAttrNode[chunk][index] = new AttrNSImpl();
}
fAttrNodeIndex++;
return fAttrNode[chunk][index];
|
public final ElementNSImpl | getElementNode()This method creates a new element node or provides a
free element node if such exists in the pool.
int chunk = fElementIndex >> CHUNK_SHIFT;
int index = fElementIndex & CHUNK_MASK;
ensureElementsCapacity(chunk);
if (fElements[chunk][index] == null) {
fElements[chunk][index] = new ElementNSImpl();
}
fElementIndex++;
return fElements[chunk][index];
|
public final com.sun.org.apache.xerces.internal.dom.TextImpl | getTextNode()This methods creates text node or provides a free
text node if such exists in the pool.
int chunk = fTextNodeIndex >> CHUNK_SHIFT;
int index = fTextNodeIndex & CHUNK_MASK;
ensureTextCapacity(chunk);
if (fTextNode[chunk][index] == null) {
fTextNode[chunk][index] = new TextImpl();
}
fTextNodeIndex++;
return fTextNode[chunk][index];
|
public void | reset()Reset the pool. The nodes in the pool become 'free' nodes.
fElementIndex = 0;
fTextNodeIndex = 0;
fAttrNodeIndex = 0;
|
private static ElementNSImpl[][] | resize(ElementNSImpl[][] array, int newsize)
ElementNSImpl newarray[][] = new ElementNSImpl[newsize][];
System.arraycopy(array, 0, newarray, 0, array.length);
return newarray;
|
private static com.sun.org.apache.xerces.internal.dom.TextImpl[][] | resize(com.sun.org.apache.xerces.internal.dom.TextImpl[][] array, int newsize)
TextImpl newarray[][] = new TextImpl[newsize][];
System.arraycopy(array, 0, newarray, 0, array.length);
return newarray;
|
private static com.sun.org.apache.xerces.internal.dom.AttrNSImpl[][] | resize(com.sun.org.apache.xerces.internal.dom.AttrNSImpl[][] array, int newsize)
AttrNSImpl newarray[][] = new AttrNSImpl[newsize][];
System.arraycopy(array, 0, newarray, 0, array.length);
return newarray;
|