1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2<!-- NewPage --> 3<html lang="en"> 4<head> 5<!-- Generated by javadoc (version 1.7.0_10-ea) on Sun Jul 14 20:03:21 PDT 2013 --> 6<title>JsonStreamContext (Jackson JSON Processor)</title> 7<meta name="date" content="2013-07-14"> 8<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style"> 9</head> 10<body> 11<script type="text/javascript"><!-- 12 if (location.href.indexOf('is-external=true') == -1) { 13 parent.document.title="JsonStreamContext (Jackson JSON Processor)"; 14 } 15//--> 16</script> 17<noscript> 18<div>JavaScript is disabled on your browser.</div> 19</noscript> 20<!-- ========= START OF TOP NAVBAR ======= --> 21<div class="topNav"><a name="navbar_top"> 22<!-- --> 23</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> 24<!-- --> 25</a> 26<ul class="navList" title="Navigation"> 27<li><a href="../../../overview-summary.html">Overview</a></li> 28<li><a href="package-summary.html">Package</a></li> 29<li class="navBarCell1Rev">Class</li> 30<li><a href="class-use/JsonStreamContext.html">Use</a></li> 31<li><a href="package-tree.html">Tree</a></li> 32<li><a href="../../../deprecated-list.html">Deprecated</a></li> 33<li><a href="../../../index-all.html">Index</a></li> 34<li><a href="../../../help-doc.html">Help</a></li> 35</ul> 36</div> 37<div class="subNav"> 38<ul class="navList"> 39<li><a href="../../../org/codehaus/jackson/JsonProcessingException.html" title="class in org.codehaus.jackson"><span class="strong">Prev Class</span></a></li> 40<li><a href="../../../org/codehaus/jackson/JsonToken.html" title="enum in org.codehaus.jackson"><span class="strong">Next Class</span></a></li> 41</ul> 42<ul class="navList"> 43<li><a href="../../../index.html?org/codehaus/jackson/JsonStreamContext.html" target="_top">Frames</a></li> 44<li><a href="JsonStreamContext.html" target="_top">No Frames</a></li> 45</ul> 46<ul class="navList" id="allclasses_navbar_top"> 47<li><a href="../../../allclasses-noframe.html">All Classes</a></li> 48</ul> 49<div> 50<script type="text/javascript"><!-- 51 allClassesLink = document.getElementById("allclasses_navbar_top"); 52 if(window==top) { 53 allClassesLink.style.display = "block"; 54 } 55 else { 56 allClassesLink.style.display = "none"; 57 } 58 //--> 59</script> 60</div> 61<div> 62<ul class="subNavList"> 63<li>Summary: </li> 64<li>Nested | </li> 65<li><a href="#field_summary">Field</a> | </li> 66<li><a href="#constructor_summary">Constr</a> | </li> 67<li><a href="#method_summary">Method</a></li> 68</ul> 69<ul class="subNavList"> 70<li>Detail: </li> 71<li><a href="#field_detail">Field</a> | </li> 72<li><a href="#constructor_detail">Constr</a> | </li> 73<li><a href="#method_detail">Method</a></li> 74</ul> 75</div> 76<a name="skip-navbar_top"> 77<!-- --> 78</a></div> 79<!-- ========= END OF TOP NAVBAR ========= --> 80<!-- ======== START OF CLASS DATA ======== --> 81<div class="header"> 82<div class="subTitle">org.codehaus.jackson</div> 83<h2 title="Class JsonStreamContext" class="title">Class JsonStreamContext</h2> 84</div> 85<div class="contentContainer"> 86<ul class="inheritance"> 87<li><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> 88<li> 89<ul class="inheritance"> 90<li>org.codehaus.jackson.JsonStreamContext</li> 91</ul> 92</li> 93</ul> 94<div class="description"> 95<ul class="blockList"> 96<li class="blockList"> 97<dl> 98<dt>Direct Known Subclasses:</dt> 99<dd><a href="../../../org/codehaus/jackson/impl/JsonReadContext.html" title="class in org.codehaus.jackson.impl">JsonReadContext</a>, <a href="../../../org/codehaus/jackson/impl/JsonWriteContext.html" title="class in org.codehaus.jackson.impl">JsonWriteContext</a></dd> 100</dl> 101<hr> 102<br> 103<pre>public abstract class <span class="strong">JsonStreamContext</span> 104extends <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> 105<div class="block">Shared base class for streaming processing contexts used during 106 reading and writing of Json content using Streaming API. 107 This context is also exposed to applications: 108 context object can be used by applications to get an idea of 109 relative position of the parser/generator within json content 110 being processed. This allows for some contextual processing: for 111 example, output within Array context can differ from that of 112 Object context.</div> 113</li> 114</ul> 115</div> 116<div class="summary"> 117<ul class="blockList"> 118<li class="blockList"> 119<!-- =========== FIELD SUMMARY =========== --> 120<ul class="blockList"> 121<li class="blockList"><a name="field_summary"> 122<!-- --> 123</a> 124<h3>Field Summary</h3> 125<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> 126<caption><span>Fields</span><span class="tabEnd"> </span></caption> 127<tr> 128<th class="colFirst" scope="col">Modifier and Type</th> 129<th class="colLast" scope="col">Field and Description</th> 130</tr> 131<tr class="altColor"> 132<td class="colFirst"><code>protected int</code></td> 133<td class="colLast"><code><strong><a href="../../../org/codehaus/jackson/JsonStreamContext.html#_index">_index</a></strong></code> 134<div class="block">Index of the currently processed entry.</div> 135</td> 136</tr> 137<tr class="rowColor"> 138<td class="colFirst"><code>protected int</code></td> 139<td class="colLast"><code><strong><a href="../../../org/codehaus/jackson/JsonStreamContext.html#_type">_type</a></strong></code> </td> 140</tr> 141<tr class="altColor"> 142<td class="colFirst"><code>protected static int</code></td> 143<td class="colLast"><code><strong><a href="../../../org/codehaus/jackson/JsonStreamContext.html#TYPE_ARRAY">TYPE_ARRAY</a></strong></code> </td> 144</tr> 145<tr class="rowColor"> 146<td class="colFirst"><code>protected static int</code></td> 147<td class="colLast"><code><strong><a href="../../../org/codehaus/jackson/JsonStreamContext.html#TYPE_OBJECT">TYPE_OBJECT</a></strong></code> </td> 148</tr> 149<tr class="altColor"> 150<td class="colFirst"><code>protected static int</code></td> 151<td class="colLast"><code><strong><a href="../../../org/codehaus/jackson/JsonStreamContext.html#TYPE_ROOT">TYPE_ROOT</a></strong></code> </td> 152</tr> 153</table> 154</li> 155</ul> 156<!-- ======== CONSTRUCTOR SUMMARY ======== --> 157<ul class="blockList"> 158<li class="blockList"><a name="constructor_summary"> 159<!-- --> 160</a> 161<h3>Constructor Summary</h3> 162<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> 163<caption><span>Constructors</span><span class="tabEnd"> </span></caption> 164<tr> 165<th class="colFirst" scope="col">Modifier</th> 166<th class="colLast" scope="col">Constructor and Description</th> 167</tr> 168<tr class="altColor"> 169<td class="colFirst"><code>protected </code></td> 170<td class="colLast"><code><strong><a href="../../../org/codehaus/jackson/JsonStreamContext.html#JsonStreamContext()">JsonStreamContext</a></strong>()</code> </td> 171</tr> 172</table> 173</li> 174</ul> 175<!-- ========== METHOD SUMMARY =========== --> 176<ul class="blockList"> 177<li class="blockList"><a name="method_summary"> 178<!-- --> 179</a> 180<h3>Method Summary</h3> 181<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> 182<caption><span>Methods</span><span class="tabEnd"> </span></caption> 183<tr> 184<th class="colFirst" scope="col">Modifier and Type</th> 185<th class="colLast" scope="col">Method and Description</th> 186</tr> 187<tr class="altColor"> 188<td class="colFirst"><code>int</code></td> 189<td class="colLast"><code><strong><a href="../../../org/codehaus/jackson/JsonStreamContext.html#getCurrentIndex()">getCurrentIndex</a></strong>()</code> </td> 190</tr> 191<tr class="rowColor"> 192<td class="colFirst"><code>abstract <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> 193<td class="colLast"><code><strong><a href="../../../org/codehaus/jackson/JsonStreamContext.html#getCurrentName()">getCurrentName</a></strong>()</code> 194<div class="block">Method for accessing name associated with the current location.</div> 195</td> 196</tr> 197<tr class="altColor"> 198<td class="colFirst"><code>int</code></td> 199<td class="colLast"><code><strong><a href="../../../org/codehaus/jackson/JsonStreamContext.html#getEntryCount()">getEntryCount</a></strong>()</code> </td> 200</tr> 201<tr class="rowColor"> 202<td class="colFirst"><code>abstract <a href="../../../org/codehaus/jackson/JsonStreamContext.html" title="class in org.codehaus.jackson">JsonStreamContext</a></code></td> 203<td class="colLast"><code><strong><a href="../../../org/codehaus/jackson/JsonStreamContext.html#getParent()">getParent</a></strong>()</code> 204<div class="block">Accessor for finding parent context of this context; will 205 return null for root context.</div> 206</td> 207</tr> 208<tr class="altColor"> 209<td class="colFirst"><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> 210<td class="colLast"><code><strong><a href="../../../org/codehaus/jackson/JsonStreamContext.html#getTypeDesc()">getTypeDesc</a></strong>()</code> 211<div class="block">Method for accessing simple type description of current context; 212 either ROOT (for root-level values), OBJECT (for field names and 213 values of JSON Objects) or ARRAY (for values of JSON Arrays)</div> 214</td> 215</tr> 216<tr class="rowColor"> 217<td class="colFirst"><code>boolean</code></td> 218<td class="colLast"><code><strong><a href="../../../org/codehaus/jackson/JsonStreamContext.html#inArray()">inArray</a></strong>()</code> 219<div class="block">Method that returns true if this context is an Array context; 220 that is, content is being read from or written to a Json Array.</div> 221</td> 222</tr> 223<tr class="altColor"> 224<td class="colFirst"><code>boolean</code></td> 225<td class="colLast"><code><strong><a href="../../../org/codehaus/jackson/JsonStreamContext.html#inObject()">inObject</a></strong>()</code> 226<div class="block">Method that returns true if this context is an Object context; 227 that is, content is being read from or written to a Json Object.</div> 228</td> 229</tr> 230<tr class="rowColor"> 231<td class="colFirst"><code>boolean</code></td> 232<td class="colLast"><code><strong><a href="../../../org/codehaus/jackson/JsonStreamContext.html#inRoot()">inRoot</a></strong>()</code> 233<div class="block">Method that returns true if this context is a Root context; 234 that is, content is being read from or written to without 235 enclosing array or object structure.</div> 236</td> 237</tr> 238</table> 239<ul class="blockList"> 240<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object"> 241<!-- --> 242</a> 243<h3>Methods inherited from class java.lang.<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> 244<code><a href="http://docs.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://docs.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://docs.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://docs.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://docs.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://docs.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://docs.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://docs.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://docs.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://docs.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://docs.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></li> 245</ul> 246</li> 247</ul> 248</li> 249</ul> 250</div> 251<div class="details"> 252<ul class="blockList"> 253<li class="blockList"> 254<!-- ============ FIELD DETAIL =========== --> 255<ul class="blockList"> 256<li class="blockList"><a name="field_detail"> 257<!-- --> 258</a> 259<h3>Field Detail</h3> 260<a name="TYPE_ROOT"> 261<!-- --> 262</a> 263<ul class="blockList"> 264<li class="blockList"> 265<h4>TYPE_ROOT</h4> 266<pre>protected static final int TYPE_ROOT</pre> 267<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.codehaus.jackson.JsonStreamContext.TYPE_ROOT">Constant Field Values</a></dd></dl> 268</li> 269</ul> 270<a name="TYPE_ARRAY"> 271<!-- --> 272</a> 273<ul class="blockList"> 274<li class="blockList"> 275<h4>TYPE_ARRAY</h4> 276<pre>protected static final int TYPE_ARRAY</pre> 277<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.codehaus.jackson.JsonStreamContext.TYPE_ARRAY">Constant Field Values</a></dd></dl> 278</li> 279</ul> 280<a name="TYPE_OBJECT"> 281<!-- --> 282</a> 283<ul class="blockList"> 284<li class="blockList"> 285<h4>TYPE_OBJECT</h4> 286<pre>protected static final int TYPE_OBJECT</pre> 287<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../constant-values.html#org.codehaus.jackson.JsonStreamContext.TYPE_OBJECT">Constant Field Values</a></dd></dl> 288</li> 289</ul> 290<a name="_type"> 291<!-- --> 292</a> 293<ul class="blockList"> 294<li class="blockList"> 295<h4>_type</h4> 296<pre>protected int _type</pre> 297</li> 298</ul> 299<a name="_index"> 300<!-- --> 301</a> 302<ul class="blockListLast"> 303<li class="blockList"> 304<h4>_index</h4> 305<pre>protected int _index</pre> 306<div class="block">Index of the currently processed entry. Starts with -1 to signal 307 that no entries have been started, and gets advanced each 308 time a new entry is started, either by encountering an expected 309 separator, or with new values if no separators are expected 310 (the case for root context).</div> 311</li> 312</ul> 313</li> 314</ul> 315<!-- ========= CONSTRUCTOR DETAIL ======== --> 316<ul class="blockList"> 317<li class="blockList"><a name="constructor_detail"> 318<!-- --> 319</a> 320<h3>Constructor Detail</h3> 321<a name="JsonStreamContext()"> 322<!-- --> 323</a> 324<ul class="blockListLast"> 325<li class="blockList"> 326<h4>JsonStreamContext</h4> 327<pre>protected JsonStreamContext()</pre> 328</li> 329</ul> 330</li> 331</ul> 332<!-- ============ METHOD DETAIL ========== --> 333<ul class="blockList"> 334<li class="blockList"><a name="method_detail"> 335<!-- --> 336</a> 337<h3>Method Detail</h3> 338<a name="getParent()"> 339<!-- --> 340</a> 341<ul class="blockList"> 342<li class="blockList"> 343<h4>getParent</h4> 344<pre>public abstract <a href="../../../org/codehaus/jackson/JsonStreamContext.html" title="class in org.codehaus.jackson">JsonStreamContext</a> getParent()</pre> 345<div class="block">Accessor for finding parent context of this context; will 346 return null for root context.</div> 347</li> 348</ul> 349<a name="inArray()"> 350<!-- --> 351</a> 352<ul class="blockList"> 353<li class="blockList"> 354<h4>inArray</h4> 355<pre>public final boolean inArray()</pre> 356<div class="block">Method that returns true if this context is an Array context; 357 that is, content is being read from or written to a Json Array.</div> 358</li> 359</ul> 360<a name="inRoot()"> 361<!-- --> 362</a> 363<ul class="blockList"> 364<li class="blockList"> 365<h4>inRoot</h4> 366<pre>public final boolean inRoot()</pre> 367<div class="block">Method that returns true if this context is a Root context; 368 that is, content is being read from or written to without 369 enclosing array or object structure.</div> 370</li> 371</ul> 372<a name="inObject()"> 373<!-- --> 374</a> 375<ul class="blockList"> 376<li class="blockList"> 377<h4>inObject</h4> 378<pre>public final boolean inObject()</pre> 379<div class="block">Method that returns true if this context is an Object context; 380 that is, content is being read from or written to a Json Object.</div> 381</li> 382</ul> 383<a name="getTypeDesc()"> 384<!-- --> 385</a> 386<ul class="blockList"> 387<li class="blockList"> 388<h4>getTypeDesc</h4> 389<pre>public final <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getTypeDesc()</pre> 390<div class="block">Method for accessing simple type description of current context; 391 either ROOT (for root-level values), OBJECT (for field names and 392 values of JSON Objects) or ARRAY (for values of JSON Arrays)</div> 393</li> 394</ul> 395<a name="getEntryCount()"> 396<!-- --> 397</a> 398<ul class="blockList"> 399<li class="blockList"> 400<h4>getEntryCount</h4> 401<pre>public final int getEntryCount()</pre> 402<dl><dt><span class="strong">Returns:</span></dt><dd>Number of entries that are complete and started.</dd></dl> 403</li> 404</ul> 405<a name="getCurrentIndex()"> 406<!-- --> 407</a> 408<ul class="blockList"> 409<li class="blockList"> 410<h4>getCurrentIndex</h4> 411<pre>public final int getCurrentIndex()</pre> 412<dl><dt><span class="strong">Returns:</span></dt><dd>Index of the currently processed entry, if any</dd></dl> 413</li> 414</ul> 415<a name="getCurrentName()"> 416<!-- --> 417</a> 418<ul class="blockListLast"> 419<li class="blockList"> 420<h4>getCurrentName</h4> 421<pre>public abstract <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getCurrentName()</pre> 422<div class="block">Method for accessing name associated with the current location. 423 Non-null for <code>FIELD_NAME</code> and value events that directly 424 follow field names; null for root level and array values.</div> 425</li> 426</ul> 427</li> 428</ul> 429</li> 430</ul> 431</div> 432</div> 433<!-- ========= END OF CLASS DATA ========= --> 434<!-- ======= START OF BOTTOM NAVBAR ====== --> 435<div class="bottomNav"><a name="navbar_bottom"> 436<!-- --> 437</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> 438<!-- --> 439</a> 440<ul class="navList" title="Navigation"> 441<li><a href="../../../overview-summary.html">Overview</a></li> 442<li><a href="package-summary.html">Package</a></li> 443<li class="navBarCell1Rev">Class</li> 444<li><a href="class-use/JsonStreamContext.html">Use</a></li> 445<li><a href="package-tree.html">Tree</a></li> 446<li><a href="../../../deprecated-list.html">Deprecated</a></li> 447<li><a href="../../../index-all.html">Index</a></li> 448<li><a href="../../../help-doc.html">Help</a></li> 449</ul> 450</div> 451<div class="subNav"> 452<ul class="navList"> 453<li><a href="../../../org/codehaus/jackson/JsonProcessingException.html" title="class in org.codehaus.jackson"><span class="strong">Prev Class</span></a></li> 454<li><a href="../../../org/codehaus/jackson/JsonToken.html" title="enum in org.codehaus.jackson"><span class="strong">Next Class</span></a></li> 455</ul> 456<ul class="navList"> 457<li><a href="../../../index.html?org/codehaus/jackson/JsonStreamContext.html" target="_top">Frames</a></li> 458<li><a href="JsonStreamContext.html" target="_top">No Frames</a></li> 459</ul> 460<ul class="navList" id="allclasses_navbar_bottom"> 461<li><a href="../../../allclasses-noframe.html">All Classes</a></li> 462</ul> 463<div> 464<script type="text/javascript"><!-- 465 allClassesLink = document.getElementById("allclasses_navbar_bottom"); 466 if(window==top) { 467 allClassesLink.style.display = "block"; 468 } 469 else { 470 allClassesLink.style.display = "none"; 471 } 472 //--> 473</script> 474</div> 475<div> 476<ul class="subNavList"> 477<li>Summary: </li> 478<li>Nested | </li> 479<li><a href="#field_summary">Field</a> | </li> 480<li><a href="#constructor_summary">Constr</a> | </li> 481<li><a href="#method_summary">Method</a></li> 482</ul> 483<ul class="subNavList"> 484<li>Detail: </li> 485<li><a href="#field_detail">Field</a> | </li> 486<li><a href="#constructor_detail">Constr</a> | </li> 487<li><a href="#method_detail">Method</a></li> 488</ul> 489</div> 490<a name="skip-navbar_bottom"> 491<!-- --> 492</a></div> 493<!-- ======== END OF BOTTOM NAVBAR ======= --> 494</body> 495</html> 496