• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_79) on Wed Jul 20 08:39:11 PDT 2016 -->
6<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
7<title>ContextualDeserializer (jackson-databind 2.8.0 API)</title>
8<meta name="date" content="2016-07-20">
9<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
10</head>
11<body>
12<script type="text/javascript"><!--
13    if (location.href.indexOf('is-external=true') == -1) {
14        parent.document.title="ContextualDeserializer (jackson-databind 2.8.0 API)";
15    }
16//-->
17</script>
18<noscript>
19<div>JavaScript is disabled on your browser.</div>
20</noscript>
21<!-- ========= START OF TOP NAVBAR ======= -->
22<div class="topNav"><a name="navbar_top">
23<!--   -->
24</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
25<!--   -->
26</a>
27<ul class="navList" title="Navigation">
28<li><a href="../../../../../overview-summary.html">Overview</a></li>
29<li><a href="package-summary.html">Package</a></li>
30<li class="navBarCell1Rev">Class</li>
31<li><a href="class-use/ContextualDeserializer.html">Use</a></li>
32<li><a href="package-tree.html">Tree</a></li>
33<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
34<li><a href="../../../../../index-all.html">Index</a></li>
35<li><a href="../../../../../help-doc.html">Help</a></li>
36</ul>
37</div>
38<div class="subNav">
39<ul class="navList">
40<li><a href="../../../../../com/fasterxml/jackson/databind/deser/BuilderBasedDeserializer.html" title="class in com.fasterxml.jackson.databind.deser"><span class="strong">Prev Class</span></a></li>
41<li><a href="../../../../../com/fasterxml/jackson/databind/deser/ContextualKeyDeserializer.html" title="interface in com.fasterxml.jackson.databind.deser"><span class="strong">Next Class</span></a></li>
42</ul>
43<ul class="navList">
44<li><a href="../../../../../index.html?com/fasterxml/jackson/databind/deser/ContextualDeserializer.html" target="_top">Frames</a></li>
45<li><a href="ContextualDeserializer.html" target="_top">No Frames</a></li>
46</ul>
47<ul class="navList" id="allclasses_navbar_top">
48<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
49</ul>
50<div>
51<script type="text/javascript"><!--
52  allClassesLink = document.getElementById("allclasses_navbar_top");
53  if(window==top) {
54    allClassesLink.style.display = "block";
55  }
56  else {
57    allClassesLink.style.display = "none";
58  }
59  //-->
60</script>
61</div>
62<div>
63<ul class="subNavList">
64<li>Summary:&nbsp;</li>
65<li>Nested&nbsp;|&nbsp;</li>
66<li>Field&nbsp;|&nbsp;</li>
67<li>Constr&nbsp;|&nbsp;</li>
68<li><a href="#method_summary">Method</a></li>
69</ul>
70<ul class="subNavList">
71<li>Detail:&nbsp;</li>
72<li>Field&nbsp;|&nbsp;</li>
73<li>Constr&nbsp;|&nbsp;</li>
74<li><a href="#method_detail">Method</a></li>
75</ul>
76</div>
77<a name="skip-navbar_top">
78<!--   -->
79</a></div>
80<!-- ========= END OF TOP NAVBAR ========= -->
81<!-- ======== START OF CLASS DATA ======== -->
82<div class="header">
83<div class="subTitle">com.fasterxml.jackson.databind.deser</div>
84<h2 title="Interface ContextualDeserializer" class="title">Interface ContextualDeserializer</h2>
85</div>
86<div class="contentContainer">
87<div class="description">
88<ul class="blockList">
89<li class="blockList">
90<dl>
91<dt>All Known Implementing Classes:</dt>
92<dd><a href="../../../../../com/fasterxml/jackson/databind/deser/std/ArrayBlockingQueueDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.std">ArrayBlockingQueueDeserializer</a>, <a href="../../../../../com/fasterxml/jackson/databind/deser/std/AtomicReferenceDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.std">AtomicReferenceDeserializer</a>, <a href="../../../../../com/fasterxml/jackson/databind/deser/impl/BeanAsArrayBuilderDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.impl">BeanAsArrayBuilderDeserializer</a>, <a href="../../../../../com/fasterxml/jackson/databind/deser/impl/BeanAsArrayDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.impl">BeanAsArrayDeserializer</a>, <a href="../../../../../com/fasterxml/jackson/databind/deser/BeanDeserializer.html" title="class in com.fasterxml.jackson.databind.deser">BeanDeserializer</a>, <a href="../../../../../com/fasterxml/jackson/databind/deser/BeanDeserializerBase.html" title="class in com.fasterxml.jackson.databind.deser">BeanDeserializerBase</a>, <a href="../../../../../com/fasterxml/jackson/databind/deser/BuilderBasedDeserializer.html" title="class in com.fasterxml.jackson.databind.deser">BuilderBasedDeserializer</a>, <a href="../../../../../com/fasterxml/jackson/databind/deser/std/CollectionDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.std">CollectionDeserializer</a>, <a href="../../../../../com/fasterxml/jackson/databind/deser/std/DateDeserializers.CalendarDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.std">DateDeserializers.CalendarDeserializer</a>, <a href="../../../../../com/fasterxml/jackson/databind/deser/std/DateDeserializers.DateBasedDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.std">DateDeserializers.DateBasedDeserializer</a>, <a href="../../../../../com/fasterxml/jackson/databind/deser/std/DateDeserializers.DateDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.std">DateDeserializers.DateDeserializer</a>, <a href="../../../../../com/fasterxml/jackson/databind/deser/std/DateDeserializers.SqlDateDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.std">DateDeserializers.SqlDateDeserializer</a>, <a href="../../../../../com/fasterxml/jackson/databind/deser/std/DateDeserializers.TimestampDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.std">DateDeserializers.TimestampDeserializer</a>, <a href="../../../../../com/fasterxml/jackson/databind/deser/std/DelegatingDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.std">DelegatingDeserializer</a>, <a href="../../../../../com/fasterxml/jackson/databind/deser/std/EnumMapDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.std">EnumMapDeserializer</a>, <a href="../../../../../com/fasterxml/jackson/databind/deser/std/EnumSetDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.std">EnumSetDeserializer</a>, <a href="../../../../../com/fasterxml/jackson/databind/deser/std/MapDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.std">MapDeserializer</a>, <a href="../../../../../com/fasterxml/jackson/databind/deser/std/MapEntryDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.std">MapEntryDeserializer</a>, <a href="../../../../../com/fasterxml/jackson/databind/deser/std/ObjectArrayDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.std">ObjectArrayDeserializer</a>, <a href="../../../../../com/fasterxml/jackson/databind/deser/std/PrimitiveArrayDeserializers.html" title="class in com.fasterxml.jackson.databind.deser.std">PrimitiveArrayDeserializers</a>, <a href="../../../../../com/fasterxml/jackson/databind/deser/std/ReferenceTypeDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.std">ReferenceTypeDeserializer</a>, <a href="../../../../../com/fasterxml/jackson/databind/deser/std/StdDelegatingDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.std">StdDelegatingDeserializer</a>, <a href="../../../../../com/fasterxml/jackson/databind/deser/std/StringArrayDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.std">StringArrayDeserializer</a>, <a href="../../../../../com/fasterxml/jackson/databind/deser/std/StringCollectionDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.std">StringCollectionDeserializer</a>, <a href="../../../../../com/fasterxml/jackson/databind/deser/std/ThrowableDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.std">ThrowableDeserializer</a>, <a href="../../../../../com/fasterxml/jackson/databind/deser/std/UntypedObjectDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.std">UntypedObjectDeserializer</a></dd>
93</dl>
94<hr>
95<br>
96<pre>public interface <span class="strong">ContextualDeserializer</span></pre>
97<div class="block">Add-on interface that <a href="../../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="class in com.fasterxml.jackson.databind"><code>JsonDeserializer</code></a>s can implement to get a callback
98 that can be used to create contextual (context-dependent) instances of
99 deserializer to use for  handling properties of supported type.
100 This can be useful
101 for deserializers that can be configured by annotations, or should otherwise
102 have differing behavior depending on what kind of property is being deserialized.
103<p>
104 Note that in cases where deserializer needs both contextualization and
105 resolution -- that is, implements both this interface and <a href="../../../../../com/fasterxml/jackson/databind/deser/ResolvableDeserializer.html" title="interface in com.fasterxml.jackson.databind.deser"><code>ResolvableDeserializer</code></a>
106 -- resolution via <a href="../../../../../com/fasterxml/jackson/databind/deser/ResolvableDeserializer.html" title="interface in com.fasterxml.jackson.databind.deser"><code>ResolvableDeserializer</code></a> occurs first, and contextual
107 resolution (via this interface) later on.</div>
108</li>
109</ul>
110</div>
111<div class="summary">
112<ul class="blockList">
113<li class="blockList">
114<!-- ========== METHOD SUMMARY =========== -->
115<ul class="blockList">
116<li class="blockList"><a name="method_summary">
117<!--   -->
118</a>
119<h3>Method Summary</h3>
120<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
121<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
122<tr>
123<th class="colFirst" scope="col">Modifier and Type</th>
124<th class="colLast" scope="col">Method and Description</th>
125</tr>
126<tr class="altColor">
127<td class="colFirst"><code><a href="../../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="class in com.fasterxml.jackson.databind">JsonDeserializer</a>&lt;?&gt;</code></td>
128<td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/databind/deser/ContextualDeserializer.html#createContextual(com.fasterxml.jackson.databind.DeserializationContext,%20com.fasterxml.jackson.databind.BeanProperty)">createContextual</a></strong>(<a href="../../../../../com/fasterxml/jackson/databind/DeserializationContext.html" title="class in com.fasterxml.jackson.databind">DeserializationContext</a>&nbsp;ctxt,
129                <a href="../../../../../com/fasterxml/jackson/databind/BeanProperty.html" title="interface in com.fasterxml.jackson.databind">BeanProperty</a>&nbsp;property)</code>
130<div class="block">Method called to see if a different (or differently configured) deserializer
131 is needed to deserialize values of specified property.</div>
132</td>
133</tr>
134</table>
135</li>
136</ul>
137</li>
138</ul>
139</div>
140<div class="details">
141<ul class="blockList">
142<li class="blockList">
143<!-- ============ METHOD DETAIL ========== -->
144<ul class="blockList">
145<li class="blockList"><a name="method_detail">
146<!--   -->
147</a>
148<h3>Method Detail</h3>
149<a name="createContextual(com.fasterxml.jackson.databind.DeserializationContext, com.fasterxml.jackson.databind.BeanProperty)">
150<!--   -->
151</a>
152<ul class="blockListLast">
153<li class="blockList">
154<h4>createContextual</h4>
155<pre><a href="../../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="class in com.fasterxml.jackson.databind">JsonDeserializer</a>&lt;?&gt;&nbsp;createContextual(<a href="../../../../../com/fasterxml/jackson/databind/DeserializationContext.html" title="class in com.fasterxml.jackson.databind">DeserializationContext</a>&nbsp;ctxt,
156                                   <a href="../../../../../com/fasterxml/jackson/databind/BeanProperty.html" title="interface in com.fasterxml.jackson.databind">BeanProperty</a>&nbsp;property)
157                                     throws <a href="../../../../../com/fasterxml/jackson/databind/JsonMappingException.html" title="class in com.fasterxml.jackson.databind">JsonMappingException</a></pre>
158<div class="block">Method called to see if a different (or differently configured) deserializer
159 is needed to deserialize values of specified property.
160 Note that instance that this method is called on is typically shared one and
161 as a result method should <b>NOT</b> modify this instance but rather construct
162 and return a new instance. This instance should only be returned as-is, in case
163 it is already suitable for use.</div>
164<dl><dt><span class="strong">Parameters:</span></dt><dd><code>ctxt</code> - Deserialization context to access configuration, additional
165    deserializers that may be needed by this deserializer</dd><dd><code>property</code> - Method, field or constructor parameter that represents the property
166   (and is used to assign deserialized value).
167   Should be available; but there may be cases where caller can not provide it and
168   null is passed instead (in which case impls usually pass 'this' deserializer as is)</dd>
169<dt><span class="strong">Returns:</span></dt><dd>Deserializer to use for deserializing values of specified property;
170   may be this instance or a new instance.</dd>
171<dt><span class="strong">Throws:</span></dt>
172<dd><code><a href="../../../../../com/fasterxml/jackson/databind/JsonMappingException.html" title="class in com.fasterxml.jackson.databind">JsonMappingException</a></code></dd></dl>
173</li>
174</ul>
175</li>
176</ul>
177</li>
178</ul>
179</div>
180</div>
181<!-- ========= END OF CLASS DATA ========= -->
182<!-- ======= START OF BOTTOM NAVBAR ====== -->
183<div class="bottomNav"><a name="navbar_bottom">
184<!--   -->
185</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
186<!--   -->
187</a>
188<ul class="navList" title="Navigation">
189<li><a href="../../../../../overview-summary.html">Overview</a></li>
190<li><a href="package-summary.html">Package</a></li>
191<li class="navBarCell1Rev">Class</li>
192<li><a href="class-use/ContextualDeserializer.html">Use</a></li>
193<li><a href="package-tree.html">Tree</a></li>
194<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
195<li><a href="../../../../../index-all.html">Index</a></li>
196<li><a href="../../../../../help-doc.html">Help</a></li>
197</ul>
198</div>
199<div class="subNav">
200<ul class="navList">
201<li><a href="../../../../../com/fasterxml/jackson/databind/deser/BuilderBasedDeserializer.html" title="class in com.fasterxml.jackson.databind.deser"><span class="strong">Prev Class</span></a></li>
202<li><a href="../../../../../com/fasterxml/jackson/databind/deser/ContextualKeyDeserializer.html" title="interface in com.fasterxml.jackson.databind.deser"><span class="strong">Next Class</span></a></li>
203</ul>
204<ul class="navList">
205<li><a href="../../../../../index.html?com/fasterxml/jackson/databind/deser/ContextualDeserializer.html" target="_top">Frames</a></li>
206<li><a href="ContextualDeserializer.html" target="_top">No Frames</a></li>
207</ul>
208<ul class="navList" id="allclasses_navbar_bottom">
209<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
210</ul>
211<div>
212<script type="text/javascript"><!--
213  allClassesLink = document.getElementById("allclasses_navbar_bottom");
214  if(window==top) {
215    allClassesLink.style.display = "block";
216  }
217  else {
218    allClassesLink.style.display = "none";
219  }
220  //-->
221</script>
222</div>
223<div>
224<ul class="subNavList">
225<li>Summary:&nbsp;</li>
226<li>Nested&nbsp;|&nbsp;</li>
227<li>Field&nbsp;|&nbsp;</li>
228<li>Constr&nbsp;|&nbsp;</li>
229<li><a href="#method_summary">Method</a></li>
230</ul>
231<ul class="subNavList">
232<li>Detail:&nbsp;</li>
233<li>Field&nbsp;|&nbsp;</li>
234<li>Constr&nbsp;|&nbsp;</li>
235<li><a href="#method_detail">Method</a></li>
236</ul>
237</div>
238<a name="skip-navbar_bottom">
239<!--   -->
240</a></div>
241<!-- ======== END OF BOTTOM NAVBAR ======= -->
242<p class="legalCopy"><small>Copyright &#169; 2008&#x2013;2016 <a href="http://fasterxml.com/">FasterXML</a>. All rights reserved.</small></p>
243</body>
244</html>
245