java.lang.Object | |
↳ | com.thoughtworks.xstream.io.ReaderWrapper |
Known Direct Subclasses |
Base class to make it easy to create wrappers (decorators) for HierarchicalStreamReader.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
wrapped |
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
If any errors are detected, allow the reader to add any additional information that can aid debugging
(such as line numbers, XPath expressions, etc).
| |||||||||||
Close the reader, if necessary.
| |||||||||||
Get the value of an attribute of the current node, by index.
| |||||||||||
Get the value of an attribute of the current node.
| |||||||||||
Number of attributes in current node.
| |||||||||||
Name of attribute in current node.
| |||||||||||
Names of attributes (as Strings).
| |||||||||||
Get the name of the current node.
| |||||||||||
Get the value (text content) of the current node.
| |||||||||||
Does the node have any more children remaining that have not yet been read?
| |||||||||||
Select the current child as current node.
| |||||||||||
Select the parent node as current node.
| |||||||||||
Return the underlying HierarchicalStreamReader implementation.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.thoughtworks.xstream.io.HierarchicalStreamReader
|
If any errors are detected, allow the reader to add any additional information that can aid debugging (such as line numbers, XPath expressions, etc).
Close the reader, if necessary.
Number of attributes in current node.
Does the node have any more children remaining that have not yet been read?
Select the current child as current node.
A call to this function must be balanced with a call to moveUp()
.
Select the parent node as current node.
Return the underlying HierarchicalStreamReader implementation.
If a Converter needs to access methods of a specific HierarchicalStreamReader implementation that are not defined in the HierarchicalStreamReader interface, it should call this method before casting. This is because the reader passed to the Converter is often wrapped/decorated by another implementation to provide additional functionality (such as XPath tracking).
For example:
MySpecificReader mySpecificReader = (MySpecificReader)reader; // INCORRECT! mySpecificReader.doSomethingSpecific();
MySpecificReader mySpecificReader = (MySpecificReader)reader.underlyingReader(); // CORRECT! mySpecificReader.doSomethingSpecific();
Implementations of HierarchicalStreamReader should return 'this', unless they are a decorator, in which case they should delegate to whatever they are wrapping.