Top Inners Fields Constructors Methods
com.thoughtworks.xstream.io.xml

public abstract Class AbstractDocumentReader

extends AbstractXmlReader
implements DocumentReader
Class Inheritance
All Implemented Interfaces
com.thoughtworks.xstream.io.xml.DocumentReader, com.thoughtworks.xstream.io.HierarchicalStreamReader, com.thoughtworks.xstream.converters.ErrorReporter
Known Direct Subclasses
com.thoughtworks.xstream.io.xml.Dom4JReader, com.thoughtworks.xstream.io.xml.DomReader, com.thoughtworks.xstream.io.xml.JDom2Reader, com.thoughtworks.xstream.io.xml.JDomReader, com.thoughtworks.xstream.io.xml.XomReader, com.thoughtworks.xstream.io.xml.XppDomReader
Imports
java.util.Iterator, com.thoughtworks.xstream.converters.ErrorWriter, com.thoughtworks.xstream.core.util.FastStack, com.thoughtworks.xstream.io.AttributeNameIterator, com.thoughtworks.xstream.io.naming.NameCoder

Deprecated

as a consequence of AbstractXmlReader being deprecated. See corresponding docs for further information.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private Object
private FastStack

Constructor Summary

AccessConstructor and Description
protected
protected
AbstractDocumentReader(Object rootElement, NameCoder nameCoder)

protected

Method Summary

Modifier and TypeMethod and Description
public void
appendErrors(ErrorWriter
the error writer
errorWriter
)

Implements com.thoughtworks.xstream.io.HierarchicalStreamReader.appendErrors.

If any errors are detected, allow the reader to add any additional information that can aid debugging (such as line numbers, XPath expressions, etc).
public void
close()

Implements com.thoughtworks.xstream.io.HierarchicalStreamReader.close.

Close the reader, if necessary.
public Iterator<E>
getAttributeNames()

Implements com.thoughtworks.xstream.io.HierarchicalStreamReader.getAttributeNames.

Iterator with the names of the attributes.
protected abstract Object
getChild(int index)

protected abstract int
public Object
getCurrent()

Implements com.thoughtworks.xstream.io.xml.DocumentReader.getCurrent.

Retrieve the current processed node of the DOM.
protected abstract Object
public boolean
hasMoreChildren()

Implements com.thoughtworks.xstream.io.HierarchicalStreamReader.hasMoreChildren.

Does the node have any more children remaining that have not yet been read?
public void
moveDown()

Implements com.thoughtworks.xstream.io.HierarchicalStreamReader.moveDown.

Select the current child as current node.
public void
moveUp()

Implements com.thoughtworks.xstream.io.HierarchicalStreamReader.moveUp.

Select the parent node as current node.
protected abstract void
Inherited from com.thoughtworks.xstream.io.xml.AbstractXmlReader:
escapeXmlNameunescapeXmlName

Field Detail

currentback to summary
private Object current
pointersback to summary
private FastStack pointers

Constructor Detail

AbstractDocumentReaderback to summary
protected AbstractDocumentReader(Object rootElement)
AbstractDocumentReaderback to summary
protected AbstractDocumentReader(Object rootElement, NameCoder nameCoder)
Since
1.4
AbstractDocumentReaderback to summary
protected AbstractDocumentReader(Object rootElement, XmlFriendlyReplacer replacer)
Since
1.2

Method Detail

appendErrorsback to summary
public void appendErrors(ErrorWriter errorWriter)

Implements com.thoughtworks.xstream.io.HierarchicalStreamReader.appendErrors.

Doc from com.thoughtworks.xstream.io.HierarchicalStreamReader.appendErrors.

If any errors are detected, allow the reader to add any additional information that can aid debugging (such as line numbers, XPath expressions, etc).

Parameters
errorWriter:ErrorWriter

Doc from com.thoughtworks.xstream.converters.ErrorReporter.appendErrors.

the error writer

closeback to summary
public void close()

Implements com.thoughtworks.xstream.io.HierarchicalStreamReader.close.

Doc from com.thoughtworks.xstream.io.HierarchicalStreamReader.close.

Close the reader, if necessary.

getAttributeNamesback to summary
public Iterator<E> getAttributeNames()

Implements com.thoughtworks.xstream.io.HierarchicalStreamReader.getAttributeNames.

Doc from com.thoughtworks.xstream.io.HierarchicalStreamReader.getAttributeNames.

Iterator with the names of the attributes.

Note, the iterator is only valid as long as the internal state of the underlying parser is still at the start of the current element. The behavior is undefined if the parser moved on.

getChildback to summary
protected abstract Object getChild(int index)
getChildCountback to summary
protected abstract int getChildCount()
getCurrentback to summary
public Object getCurrent()

Implements com.thoughtworks.xstream.io.xml.DocumentReader.getCurrent.

Doc from com.thoughtworks.xstream.io.xml.DocumentReader.getCurrent.

Retrieve the current processed node of the DOM.

Returns:Object

the current node

getParentback to summary
protected abstract Object getParent()
hasMoreChildrenback to summary
public boolean hasMoreChildren()

Implements com.thoughtworks.xstream.io.HierarchicalStreamReader.hasMoreChildren.

Doc from com.thoughtworks.xstream.io.HierarchicalStreamReader.hasMoreChildren.

Does the node have any more children remaining that have not yet been read?

moveDownback to summary
public void moveDown()

Implements com.thoughtworks.xstream.io.HierarchicalStreamReader.moveDown.

Doc from com.thoughtworks.xstream.io.HierarchicalStreamReader.moveDown.

Select the current child as current node. A call to this function must be balanced with a call to moveUp().

moveUpback to summary
public void moveUp()

Implements com.thoughtworks.xstream.io.HierarchicalStreamReader.moveUp.

Doc from com.thoughtworks.xstream.io.HierarchicalStreamReader.moveUp.

Select the parent node as current node.

reassignCurrentElementback to summary
protected abstract void reassignCurrentElement(Object current)
com.thoughtworks.xstream.io.xml back to summary

private Class AbstractDocumentReader.Pointer

extends Object
Class Inheritance
  • java.lang.Object
  • com.thoughtworks.xstream.io.xml.AbstractDocumentReader.Pointer

Field Summary

Modifier and TypeField and Description
public int
v

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

vback to summary
public int v

Constructor Detail

Pointerback to summary
private Pointer()