java.lang.Object | |
↳ | com.thoughtworks.xstream.io.path.PathTracker |
Maintains the current Path
as a stream is moved through.
Can be linked to a HierarchicalStreamWriter or HierarchicalStreamReader by wrapping them with a PathTrackingWriter or PathTrackingReader.
PathTracker tracker = new PathTracker(); tracker.pushElement("table"); tracker.pushElement("tr"); tracker.pushElement("td"); tracker.pushElement("form"); tracker.popElement("form"); tracker.popElement("td"); tracker.pushElement("td"); tracker.pushElement("div"); Path path = tracker.getPath(); // returns "/table/tr/td[2]/div"
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This method is deprecated.
Use
getPath() instead.
| |||||||||||
Current Path in stream.
| |||||||||||
Notify the tracker that the stream has moved out of an element.
| |||||||||||
Notify the tracker that the stream has moved into a new element.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
initialCapacity | Size of the initial stack of nodes (one level per depth in the tree). Note that this is only for optimizations - the stack will resize itself if it exceeds its capacity. If in doubt, use the other constructor. |
---|
Notify the tracker that the stream has moved out of an element.
Notify the tracker that the stream has moved into a new element.
name | Name of the element |
---|