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> 8ContextualKeyDeserializer (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="ContextualKeyDeserializer (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> </TD> 42 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> 43 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> 44 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ContextualKeyDeserializer.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> 45 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> 46 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> 47 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> 48 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </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 <A HREF="../../../../../com/fasterxml/jackson/databind/deser/ContextualDeserializer.html" title="interface in com.fasterxml.jackson.databind.deser"><B>PREV CLASS</B></A> 60 <A HREF="../../../../../com/fasterxml/jackson/databind/deser/CreatorProperty.html" title="class 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/ContextualKeyDeserializer.html" target="_top"><B>FRAMES</B></A> 63 <A HREF="ContextualKeyDeserializer.html" target="_top"><B>NO FRAMES</B></A> 64 <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: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> 81<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 82DETAIL: FIELD | CONSTR | <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 ContextualKeyDeserializer</H2> 95<HR> 96<DL> 97<DT><PRE>public interface <B>ContextualKeyDeserializer</B></DL> 98</PRE> 99 100<P> 101Add-on interface that <A HREF="../../../../../com/fasterxml/jackson/databind/KeyDeserializer.html" title="class in com.fasterxml.jackson.databind"><CODE>KeyDeserializer</CODE></A>s can implement to get a callback 102 that can be used to create contextual instances of key deserializer to use for 103 handling Map keys of supported type. This can be useful 104 for key deserializers that can be configured by annotations, or should otherwise 105 have differing behavior depending on what kind of Map property keys are being deserialized. 106<P> 107 108<P> 109<HR> 110 111<P> 112 113<!-- ========== METHOD SUMMARY =========== --> 114 115<A NAME="method_summary"><!-- --></A> 116<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 117<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 118<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> 119<B>Method Summary</B></FONT></TH> 120</TR> 121<TR BGCOLOR="white" CLASS="TableRowColor"> 122<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> 123<CODE> <A HREF="../../../../../com/fasterxml/jackson/databind/KeyDeserializer.html" title="class in com.fasterxml.jackson.databind">KeyDeserializer</A></CODE></FONT></TD> 124<TD><CODE><B><A HREF="../../../../../com/fasterxml/jackson/databind/deser/ContextualKeyDeserializer.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> ctxt, 125 <A HREF="../../../../../com/fasterxml/jackson/databind/BeanProperty.html" title="interface in com.fasterxml.jackson.databind">BeanProperty</A> property)</CODE> 126 127<BR> 128 Method called to see if a different (or differently configured) key deserializer 129 is needed to deserialize keys of specified Map property.</TD> 130</TR> 131</TABLE> 132 133<P> 134 135<!-- ============ METHOD DETAIL ========== --> 136 137<A NAME="method_detail"><!-- --></A> 138<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> 139<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> 140<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> 141<B>Method Detail</B></FONT></TH> 142</TR> 143</TABLE> 144 145<A NAME="createContextual(com.fasterxml.jackson.databind.DeserializationContext, com.fasterxml.jackson.databind.BeanProperty)"><!-- --></A><H3> 146createContextual</H3> 147<PRE> 148<A HREF="../../../../../com/fasterxml/jackson/databind/KeyDeserializer.html" title="class in com.fasterxml.jackson.databind">KeyDeserializer</A> <B>createContextual</B>(<A HREF="../../../../../com/fasterxml/jackson/databind/DeserializationContext.html" title="class in com.fasterxml.jackson.databind">DeserializationContext</A> ctxt, 149 <A HREF="../../../../../com/fasterxml/jackson/databind/BeanProperty.html" title="interface in com.fasterxml.jackson.databind">BeanProperty</A> property) 150 throws <A HREF="../../../../../com/fasterxml/jackson/databind/JsonMappingException.html" title="class in com.fasterxml.jackson.databind">JsonMappingException</A></PRE> 151<DL> 152<DD>Method called to see if a different (or differently configured) key deserializer 153 is needed to deserialize keys of specified Map property. 154 Note that instance that this method is called on is typically shared one and 155 as a result method should <b>NOT</b> modify this instance but rather construct 156 and return a new instance. This instance should only be returned as-is, in case 157 it is already suitable for use. 158<P> 159<DD><DL> 160<DT><B>Parameters:</B><DD><CODE>ctxt</CODE> - Deserialization context to access configuration, additional 161 deserializers that may be needed by this deserializer<DD><CODE>property</CODE> - Method, field or constructor parameter that declared Map for which 162 contextual instance will be used. Will not be available when deserializing root-level 163 Map value; otherwise should not be null. 164<DT><B>Returns:</B><DD>Key deserializer to use for deserializing keys specified Map property, 165 may be this instance or a new instance. 166<DT><B>Throws:</B> 167<DD><CODE><A HREF="../../../../../com/fasterxml/jackson/databind/JsonMappingException.html" title="class in com.fasterxml.jackson.databind">JsonMappingException</A></CODE></DL> 168</DD> 169</DL> 170<!-- ========= END OF CLASS DATA ========= --> 171<HR> 172 173 174<!-- ======= START OF BOTTOM NAVBAR ====== --> 175<A NAME="navbar_bottom"><!-- --></A> 176<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> 177<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> 178<TR> 179<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> 180<A NAME="navbar_bottom_firstrow"><!-- --></A> 181<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> 182 <TR ALIGN="center" VALIGN="top"> 183 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> 184 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> 185 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> 186 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ContextualKeyDeserializer.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> 187 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> 188 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> 189 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> 190 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> 191 </TR> 192</TABLE> 193</TD> 194<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> 195</EM> 196</TD> 197</TR> 198 199<TR> 200<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 201 <A HREF="../../../../../com/fasterxml/jackson/databind/deser/ContextualDeserializer.html" title="interface in com.fasterxml.jackson.databind.deser"><B>PREV CLASS</B></A> 202 <A HREF="../../../../../com/fasterxml/jackson/databind/deser/CreatorProperty.html" title="class in com.fasterxml.jackson.databind.deser"><B>NEXT CLASS</B></A></FONT></TD> 203<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> 204 <A HREF="../../../../../index.html?com/fasterxml/jackson/databind/deser/ContextualKeyDeserializer.html" target="_top"><B>FRAMES</B></A> 205 <A HREF="ContextualKeyDeserializer.html" target="_top"><B>NO FRAMES</B></A> 206 <SCRIPT type="text/javascript"> 207 <!-- 208 if(window==top) { 209 document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); 210 } 211 //--> 212</SCRIPT> 213<NOSCRIPT> 214 <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> 215</NOSCRIPT> 216 217 218</FONT></TD> 219</TR> 220<TR> 221<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 222 SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> 223<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> 224DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> 225</TR> 226</TABLE> 227<A NAME="skip-navbar_bottom"></A> 228<!-- ======== END OF BOTTOM NAVBAR ======= --> 229 230<HR> 231Copyright © 2012 <a href="http://fasterxml.com/">FasterXML</a>. All Rights Reserved. 232</BODY> 233</HTML> 234