com.thoughtworks.xstream.io.path
Class PathTrackingReader
java.lang.Object
com.thoughtworks.xstream.io.ReaderWrapper
com.thoughtworks.xstream.io.path.PathTrackingReader
- All Implemented Interfaces:
- ErrorReporter, ExtendedHierarchicalStreamReader, HierarchicalStreamReader
public class PathTrackingReader
- extends ReaderWrapper
Wrapper for HierarchicalStreamReader that tracks the path (a subset of XPath) of the current node that is being read.
- Author:
- Joe Walnes
- See Also:
PathTracker
,
Path
Method Summary |
void |
appendErrors(ErrorWriter errorWriter)
If any errors are detected, allow the reader to add any additional information that can aid debugging
(such as line numbers, XPath expressions, etc). |
void |
moveDown()
Select the current child as current node. |
void |
moveUp()
Select the parent node as current node. |
Methods inherited from class com.thoughtworks.xstream.io.ReaderWrapper |
close, getAttribute, getAttribute, getAttributeCount, getAttributeName, getAttributeNames, getNodeName, getValue, hasMoreChildren, peekNextChild, underlyingReader |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PathTrackingReader
public PathTrackingReader(HierarchicalStreamReader reader,
PathTracker pathTracker)
moveDown
public void moveDown()
- Description copied from interface:
HierarchicalStreamReader
- Select the current child as current node.
A call to this function must be balanced with a call to
HierarchicalStreamReader.moveUp()
.
- Specified by:
moveDown
in interface HierarchicalStreamReader
- Overrides:
moveDown
in class ReaderWrapper
moveUp
public void moveUp()
- Description copied from interface:
HierarchicalStreamReader
- Select the parent node as current node.
- Specified by:
moveUp
in interface HierarchicalStreamReader
- Overrides:
moveUp
in class ReaderWrapper
appendErrors
public void appendErrors(ErrorWriter errorWriter)
- Description copied from interface:
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).
- Specified by:
appendErrors
in interface ErrorReporter
- Specified by:
appendErrors
in interface HierarchicalStreamReader
- Overrides:
appendErrors
in class ReaderWrapper
- Parameters:
errorWriter
- the error writer
Copyright © 2004-2014 XStream. All Rights Reserved.