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