PageRenderTime 70ms CodeModel.GetById 26ms app.highlight 32ms RepoModel.GetById 1ms app.codeStats 0ms

/Prototipo/Servlet/lib/xstream-distribution-1.4.1-bin/xstream-1.4.1/docs/javadoc/com/thoughtworks/xstream/io/path/PathTracker.html

http://prototipomemoria.googlecode.com/
HTML | 345 lines | 282 code | 41 blank | 22 comment | 0 complexity | 39fe9a355aa4df68d86b5b53cdcee68a MD5 | raw file
  1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2<!--NewPage-->
  3<HTML>
  4<HEAD>
  5<!-- Generated by javadoc (build 1.6.0_26) on Thu Aug 11 04:40:24 CEST 2011 -->
  6<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
  7<TITLE>
  8PathTracker (XStream Core 1.4.1 API)
  9</TITLE>
 10
 11<META NAME="date" CONTENT="2011-08-11">
 12
 13<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
 14
 15<SCRIPT type="text/javascript">
 16function windowTitle()
 17{
 18    if (location.href.indexOf('is-external=true') == -1) {
 19        parent.document.title="PathTracker (XStream Core 1.4.1 API)";
 20    }
 21}
 22</SCRIPT>
 23<NOSCRIPT>
 24</NOSCRIPT>
 25
 26</HEAD>
 27
 28<BODY BGCOLOR="white" onload="windowTitle();">
 29<HR>
 30
 31
 32<!-- ========= START OF TOP NAVBAR ======= -->
 33<A NAME="navbar_top"><!-- --></A>
 34<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
 35<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
 36<TR>
 37<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
 38<A NAME="navbar_top_firstrow"><!-- --></A>
 39<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
 40  <TR ALIGN="center" VALIGN="top">
 41  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
 42  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
 43  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
 44  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/PathTracker.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
 45  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
 46  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
 47  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
 48  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
 49  </TR>
 50</TABLE>
 51</TD>
 52<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
 53</EM>
 54</TD>
 55</TR>
 56
 57<TR>
 58<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 59&nbsp;<A HREF="../../../../../com/thoughtworks/xstream/io/path/Path.html" title="class in com.thoughtworks.xstream.io.path"><B>PREV CLASS</B></A>&nbsp;
 60&nbsp;<A HREF="../../../../../com/thoughtworks/xstream/io/path/PathTrackingReader.html" title="class in com.thoughtworks.xstream.io.path"><B>NEXT CLASS</B></A></FONT></TD>
 61<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
 62  <A HREF="../../../../../index.html?com/thoughtworks/xstream/io/path/PathTracker.html" target="_top"><B>FRAMES</B></A>  &nbsp;
 63&nbsp;<A HREF="PathTracker.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
 64&nbsp;<SCRIPT type="text/javascript">
 65  <!--
 66  if(window==top) {
 67    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
 68  }
 69  //-->
 70</SCRIPT>
 71<NOSCRIPT>
 72  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
 73</NOSCRIPT>
 74
 75
 76</FONT></TD>
 77</TR>
 78<TR>
 79<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
 80  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
 81<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
 82DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
 83</TR>
 84</TABLE>
 85<A NAME="skip-navbar_top"></A>
 86<!-- ========= END OF TOP NAVBAR ========= -->
 87
 88<HR>
 89<!-- ======== START OF CLASS DATA ======== -->
 90<H2>
 91<FONT SIZE="-1">
 92com.thoughtworks.xstream.io.path</FONT>
 93<BR>
 94Class PathTracker</H2>
 95<PRE>
 96<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
 97  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>com.thoughtworks.xstream.io.path.PathTracker</B>
 98</PRE>
 99<HR>
100<DL>
101<DT><PRE>public class <B>PathTracker</B><DT>extends <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL>
102</PRE>
103
104<P>
105Maintains the current <A HREF="../../../../../com/thoughtworks/xstream/io/path/Path.html" title="class in com.thoughtworks.xstream.io.path"><CODE>Path</CODE></A> as a stream is moved through.
106
107 <p>Can be linked to a <A HREF="../../../../../com/thoughtworks/xstream/io/HierarchicalStreamWriter.html" title="interface in com.thoughtworks.xstream.io"><CODE>HierarchicalStreamWriter</CODE></A> or
108 <A HREF="../../../../../com/thoughtworks/xstream/io/HierarchicalStreamReader.html" title="interface in com.thoughtworks.xstream.io"><CODE>HierarchicalStreamReader</CODE></A> by wrapping them with a
109 <A HREF="../../../../../com/thoughtworks/xstream/io/path/PathTrackingWriter.html" title="class in com.thoughtworks.xstream.io.path"><CODE>PathTrackingWriter</CODE></A> or <A HREF="../../../../../com/thoughtworks/xstream/io/path/PathTrackingReader.html" title="class in com.thoughtworks.xstream.io.path"><CODE>PathTrackingReader</CODE></A>.</p>
110
111 <h3>Example</h3>
112
113 <pre>
114 PathTracker tracker = new PathTracker();
115 tracker.pushElement("table");
116 tracker.pushElement("tr");
117 tracker.pushElement("td");
118 tracker.pushElement("form");
119 tracker.popElement("form");
120 tracker.popElement("td");
121 tracker.pushElement("td");
122 tracker.pushElement("div");
123
124 Path path = tracker.getPath(); // returns "/table/tr/td[2]/div"
125 </pre>
126<P>
127
128<P>
129<DL>
130<DT><B>Author:</B></DT>
131  <DD>Joe Walnes</DD>
132<DT><B>See Also:</B><DD><A HREF="../../../../../com/thoughtworks/xstream/io/path/Path.html" title="class in com.thoughtworks.xstream.io.path"><CODE>Path</CODE></A>, 
133<A HREF="../../../../../com/thoughtworks/xstream/io/path/PathTrackingReader.html" title="class in com.thoughtworks.xstream.io.path"><CODE>PathTrackingReader</CODE></A>, 
134<A HREF="../../../../../com/thoughtworks/xstream/io/path/PathTrackingWriter.html" title="class in com.thoughtworks.xstream.io.path"><CODE>PathTrackingWriter</CODE></A></DL>
135<HR>
136
137<P>
138
139<!-- ======== CONSTRUCTOR SUMMARY ======== -->
140
141<A NAME="constructor_summary"><!-- --></A>
142<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
143<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
144<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
145<B>Constructor Summary</B></FONT></TH>
146</TR>
147<TR BGCOLOR="white" CLASS="TableRowColor">
148<TD><CODE><B><A HREF="../../../../../com/thoughtworks/xstream/io/path/PathTracker.html#PathTracker()">PathTracker</A></B>()</CODE>
149
150<BR>
151&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
152</TR>
153<TR BGCOLOR="white" CLASS="TableRowColor">
154<TD><CODE><B><A HREF="../../../../../com/thoughtworks/xstream/io/path/PathTracker.html#PathTracker(int)">PathTracker</A></B>(int&nbsp;initialCapacity)</CODE>
155
156<BR>
157&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
158</TR>
159</TABLE>
160&nbsp;
161<!-- ========== METHOD SUMMARY =========== -->
162
163<A NAME="method_summary"><!-- --></A>
164<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
165<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
166<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
167<B>Method Summary</B></FONT></TH>
168</TR>
169<TR BGCOLOR="white" CLASS="TableRowColor">
170<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
171<CODE>&nbsp;<A HREF="../../../../../com/thoughtworks/xstream/io/path/Path.html" title="class in com.thoughtworks.xstream.io.path">Path</A></CODE></FONT></TD>
172<TD><CODE><B><A HREF="../../../../../com/thoughtworks/xstream/io/path/PathTracker.html#getPath()">getPath</A></B>()</CODE>
173
174<BR>
175&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Current Path in stream.</TD>
176</TR>
177<TR BGCOLOR="white" CLASS="TableRowColor">
178<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
179<CODE>&nbsp;void</CODE></FONT></TD>
180<TD><CODE><B><A HREF="../../../../../com/thoughtworks/xstream/io/path/PathTracker.html#popElement()">popElement</A></B>()</CODE>
181
182<BR>
183&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Notify the tracker that the stream has moved out of an element.</TD>
184</TR>
185<TR BGCOLOR="white" CLASS="TableRowColor">
186<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
187<CODE>&nbsp;void</CODE></FONT></TD>
188<TD><CODE><B><A HREF="../../../../../com/thoughtworks/xstream/io/path/PathTracker.html#pushElement(java.lang.String)">pushElement</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;name)</CODE>
189
190<BR>
191&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Notify the tracker that the stream has moved into a new element.</TD>
192</TR>
193</TABLE>
194&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
195<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
196<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
197<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
198</TR>
199<TR BGCOLOR="white" CLASS="TableRowColor">
200<TD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
201</TR>
202</TABLE>
203&nbsp;
204<P>
205
206<!-- ========= CONSTRUCTOR DETAIL ======== -->
207
208<A NAME="constructor_detail"><!-- --></A>
209<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
210<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
211<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
212<B>Constructor Detail</B></FONT></TH>
213</TR>
214</TABLE>
215
216<A NAME="PathTracker()"><!-- --></A><H3>
217PathTracker</H3>
218<PRE>
219public <B>PathTracker</B>()</PRE>
220<DL>
221</DL>
222<HR>
223
224<A NAME="PathTracker(int)"><!-- --></A><H3>
225PathTracker</H3>
226<PRE>
227public <B>PathTracker</B>(int&nbsp;initialCapacity)</PRE>
228<DL>
229<DL>
230<DT><B>Parameters:</B><DD><CODE>initialCapacity</CODE> - Size of the initial stack of nodes (one level per depth in the tree). Note that this is
231                        only for optimizations - the stack will resize itself if it exceeds its capacity. If in doubt,
232                        use the other constructor.</DL>
233</DL>
234
235<!-- ============ METHOD DETAIL ========== -->
236
237<A NAME="method_detail"><!-- --></A>
238<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
239<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
240<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
241<B>Method Detail</B></FONT></TH>
242</TR>
243</TABLE>
244
245<A NAME="pushElement(java.lang.String)"><!-- --></A><H3>
246pushElement</H3>
247<PRE>
248public void <B>pushElement</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;name)</PRE>
249<DL>
250<DD>Notify the tracker that the stream has moved into a new element.
251<P>
252<DD><DL>
253<DT><B>Parameters:</B><DD><CODE>name</CODE> - Name of the element</DL>
254</DD>
255</DL>
256<HR>
257
258<A NAME="popElement()"><!-- --></A><H3>
259popElement</H3>
260<PRE>
261public void <B>popElement</B>()</PRE>
262<DL>
263<DD>Notify the tracker that the stream has moved out of an element.
264<P>
265<DD><DL>
266</DL>
267</DD>
268</DL>
269<HR>
270
271<A NAME="getPath()"><!-- --></A><H3>
272getPath</H3>
273<PRE>
274public <A HREF="../../../../../com/thoughtworks/xstream/io/path/Path.html" title="class in com.thoughtworks.xstream.io.path">Path</A> <B>getPath</B>()</PRE>
275<DL>
276<DD>Current Path in stream.
277<P>
278<DD><DL>
279</DL>
280</DD>
281</DL>
282<!-- ========= END OF CLASS DATA ========= -->
283<HR>
284
285
286<!-- ======= START OF BOTTOM NAVBAR ====== -->
287<A NAME="navbar_bottom"><!-- --></A>
288<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
289<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
290<TR>
291<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
292<A NAME="navbar_bottom_firstrow"><!-- --></A>
293<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
294  <TR ALIGN="center" VALIGN="top">
295  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
296  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
297  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
298  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/PathTracker.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
299  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
300  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
301  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
302  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
303  </TR>
304</TABLE>
305</TD>
306<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
307</EM>
308</TD>
309</TR>
310
311<TR>
312<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
313&nbsp;<A HREF="../../../../../com/thoughtworks/xstream/io/path/Path.html" title="class in com.thoughtworks.xstream.io.path"><B>PREV CLASS</B></A>&nbsp;
314&nbsp;<A HREF="../../../../../com/thoughtworks/xstream/io/path/PathTrackingReader.html" title="class in com.thoughtworks.xstream.io.path"><B>NEXT CLASS</B></A></FONT></TD>
315<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
316  <A HREF="../../../../../index.html?com/thoughtworks/xstream/io/path/PathTracker.html" target="_top"><B>FRAMES</B></A>  &nbsp;
317&nbsp;<A HREF="PathTracker.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
318&nbsp;<SCRIPT type="text/javascript">
319  <!--
320  if(window==top) {
321    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
322  }
323  //-->
324</SCRIPT>
325<NOSCRIPT>
326  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
327</NOSCRIPT>
328
329
330</FONT></TD>
331</TR>
332<TR>
333<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
334  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
335<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
336DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
337</TR>
338</TABLE>
339<A NAME="skip-navbar_bottom"></A>
340<!-- ======== END OF BOTTOM NAVBAR ======= -->
341
342<HR>
343Copyright &#169; 2004-2011 <a href="http://xstream.codehaus.org">XStream</a>. All Rights Reserved.
344</BODY>
345</HTML>