• 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>
4<HEAD>
5<!-- Generated by javadoc (build 1.6.0_35) on Tue Oct 09 17:08:11 PDT 2012 -->
6<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
7<TITLE>
8ContextualDeserializer (jackson-databind 2.1.0 API)
9</TITLE>
10
11<META NAME="date" CONTENT="2012-10-09">
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="ContextualDeserializer (jackson-databind 2.1.0 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/ContextualDeserializer.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/fasterxml/jackson/databind/deser/BuilderBasedDeserializer.html" title="class in com.fasterxml.jackson.databind.deser"><B>PREV CLASS</B></A>&nbsp;
60&nbsp;<A HREF="../../../../../com/fasterxml/jackson/databind/deser/ContextualKeyDeserializer.html" title="interface in com.fasterxml.jackson.databind.deser"><B>NEXT CLASS</B></A></FONT></TD>
61<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
62  <A HREF="../../../../../index.html?com/fasterxml/jackson/databind/deser/ContextualDeserializer.html" target="_top"><B>FRAMES</B></A>  &nbsp;
63&nbsp;<A HREF="ContextualDeserializer.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;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
81<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
82DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&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.fasterxml.jackson.databind.deser</FONT>
93<BR>
94Interface ContextualDeserializer</H2>
95<DL>
96<DT><B>All Known Implementing Classes:</B> <DD><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/JdkDeserializers.AtomicReferenceDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.std">JdkDeserializers.AtomicReferenceDeserializer</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/ObjectArrayDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.std">ObjectArrayDeserializer</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/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></DD>
97</DL>
98<HR>
99<DL>
100<DT><PRE>public interface <B>ContextualDeserializer</B></DL>
101</PRE>
102
103<P>
104Add-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
105 that can be used to create contextual (context-dependent) instances of
106 deserializer to use for  handling properties of supported type.
107 This can be useful
108 for deserializers that can be configured by annotations, or should otherwise
109 have differing behavior depending on what kind of property is being deserialized.
110<p>
111 Note that in cases where deserializer needs both contextualization and
112 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>
113 -- 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
114 resolution (via this interface) later on.
115<P>
116
117<P>
118<HR>
119
120<P>
121
122<!-- ========== METHOD SUMMARY =========== -->
123
124<A NAME="method_summary"><!-- --></A>
125<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
126<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
127<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
128<B>Method Summary</B></FONT></TH>
129</TR>
130<TR BGCOLOR="white" CLASS="TableRowColor">
131<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
132<CODE>&nbsp;<A HREF="../../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="class in com.fasterxml.jackson.databind">JsonDeserializer</A>&lt;?&gt;</CODE></FONT></TD>
133<TD><CODE><B><A HREF="../../../../../com/fasterxml/jackson/databind/deser/ContextualDeserializer.html#createContextual(com.fasterxml.jackson.databind.DeserializationContext, com.fasterxml.jackson.databind.BeanProperty)">createContextual</A></B>(<A HREF="../../../../../com/fasterxml/jackson/databind/DeserializationContext.html" title="class in com.fasterxml.jackson.databind">DeserializationContext</A>&nbsp;ctxt,
134                 <A HREF="../../../../../com/fasterxml/jackson/databind/BeanProperty.html" title="interface in com.fasterxml.jackson.databind">BeanProperty</A>&nbsp;property)</CODE>
135
136<BR>
137&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Method called to see if a different (or differently configured) deserializer
138 is needed to deserialize values of specified property.</TD>
139</TR>
140</TABLE>
141&nbsp;
142<P>
143
144<!-- ============ METHOD DETAIL ========== -->
145
146<A NAME="method_detail"><!-- --></A>
147<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
148<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
149<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
150<B>Method Detail</B></FONT></TH>
151</TR>
152</TABLE>
153
154<A NAME="createContextual(com.fasterxml.jackson.databind.DeserializationContext, com.fasterxml.jackson.databind.BeanProperty)"><!-- --></A><H3>
155createContextual</H3>
156<PRE>
157<A HREF="../../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="class in com.fasterxml.jackson.databind">JsonDeserializer</A>&lt;?&gt; <B>createContextual</B>(<A HREF="../../../../../com/fasterxml/jackson/databind/DeserializationContext.html" title="class in com.fasterxml.jackson.databind">DeserializationContext</A>&nbsp;ctxt,
158                                     <A HREF="../../../../../com/fasterxml/jackson/databind/BeanProperty.html" title="interface in com.fasterxml.jackson.databind">BeanProperty</A>&nbsp;property)
159                                     throws <A HREF="../../../../../com/fasterxml/jackson/databind/JsonMappingException.html" title="class in com.fasterxml.jackson.databind">JsonMappingException</A></PRE>
160<DL>
161<DD>Method called to see if a different (or differently configured) deserializer
162 is needed to deserialize values of specified property.
163 Note that instance that this method is called on is typically shared one and
164 as a result method should <b>NOT</b> modify this instance but rather construct
165 and return a new instance. This instance should only be returned as-is, in case
166 it is already suitable for use.
167<P>
168<DD><DL>
169<DT><B>Parameters:</B><DD><CODE>ctxt</CODE> - Deserialization context to access configuration, additional
170    deserializers that may be needed by this deserializer<DD><CODE>property</CODE> - Method, field or constructor parameter that represents the property
171   (and is used to assign deserialized value).
172   Should be available; but there may be cases where caller can not provide it and
173   null is passed instead (in which case impls usually pass 'this' deserializer as is)
174<DT><B>Returns:</B><DD>Deserializer to use for deserializing values of specified property;
175   may be this instance or a new instance.
176<DT><B>Throws:</B>
177<DD><CODE><A HREF="../../../../../com/fasterxml/jackson/databind/JsonMappingException.html" title="class in com.fasterxml.jackson.databind">JsonMappingException</A></CODE></DL>
178</DD>
179</DL>
180<!-- ========= END OF CLASS DATA ========= -->
181<HR>
182
183
184<!-- ======= START OF BOTTOM NAVBAR ====== -->
185<A NAME="navbar_bottom"><!-- --></A>
186<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
187<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
188<TR>
189<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
190<A NAME="navbar_bottom_firstrow"><!-- --></A>
191<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
192  <TR ALIGN="center" VALIGN="top">
193  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
194  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
195  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
196  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/ContextualDeserializer.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
197  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
198  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
199  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
200  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
201  </TR>
202</TABLE>
203</TD>
204<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
205</EM>
206</TD>
207</TR>
208
209<TR>
210<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
211&nbsp;<A HREF="../../../../../com/fasterxml/jackson/databind/deser/BuilderBasedDeserializer.html" title="class in com.fasterxml.jackson.databind.deser"><B>PREV CLASS</B></A>&nbsp;
212&nbsp;<A HREF="../../../../../com/fasterxml/jackson/databind/deser/ContextualKeyDeserializer.html" title="interface in com.fasterxml.jackson.databind.deser"><B>NEXT CLASS</B></A></FONT></TD>
213<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
214  <A HREF="../../../../../index.html?com/fasterxml/jackson/databind/deser/ContextualDeserializer.html" target="_top"><B>FRAMES</B></A>  &nbsp;
215&nbsp;<A HREF="ContextualDeserializer.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
216&nbsp;<SCRIPT type="text/javascript">
217  <!--
218  if(window==top) {
219    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
220  }
221  //-->
222</SCRIPT>
223<NOSCRIPT>
224  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
225</NOSCRIPT>
226
227
228</FONT></TD>
229</TR>
230<TR>
231<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
232  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
233<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
234DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
235</TR>
236</TABLE>
237<A NAME="skip-navbar_bottom"></A>
238<!-- ======== END OF BOTTOM NAVBAR ======= -->
239
240<HR>
241Copyright &#169; 2012 <a href="http://fasterxml.com/">FasterXML</a>. All Rights Reserved.
242</BODY>
243</HTML>
244