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>JsonAutoDetect (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="JsonAutoDetect (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/JsonAutoDetect.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/annotate/JsonAnySetter.html" title="annotation in org.codehaus.jackson.annotate"><span class="strong">Prev Class</span></a></li> 40<li><a href="../../../../org/codehaus/jackson/annotate/JsonAutoDetect.Visibility.html" title="enum in org.codehaus.jackson.annotate"><span class="strong">Next Class</span></a></li> 41</ul> 42<ul class="navList"> 43<li><a href="../../../../index.html?org/codehaus/jackson/annotate/JsonAutoDetect.html" target="_top">Frames</a></li> 44<li><a href="JsonAutoDetect.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>Required | </li> 65<li><a href="#annotation_type_optional_element_summary">Optional</a></li> 66</ul> 67<ul class="subNavList"> 68<li>Detail: </li> 69<li><a href="#annotation_type_element_detail">Element</a></li> 70</ul> 71</div> 72<a name="skip-navbar_top"> 73<!-- --> 74</a></div> 75<!-- ========= END OF TOP NAVBAR ========= --> 76<!-- ======== START OF CLASS DATA ======== --> 77<div class="header"> 78<div class="subTitle">org.codehaus.jackson.annotate</div> 79<h2 title="Annotation Type JsonAutoDetect" class="title">Annotation Type JsonAutoDetect</h2> 80</div> 81<div class="contentContainer"> 82<div class="description"> 83<ul class="blockList"> 84<li class="blockList"> 85<hr> 86<br> 87<pre><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/annotation/Target.html?is-external=true" title="class or interface in java.lang.annotation">@Target</a>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/annotation/Target.html?is-external=true#value()" title="class or interface in java.lang.annotation">value</a>=<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/annotation/ElementType.html?is-external=true#TYPE" title="class or interface in java.lang.annotation">TYPE</a>) 88<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/annotation/Retention.html?is-external=true" title="class or interface in java.lang.annotation">@Retention</a>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/annotation/Retention.html?is-external=true#value()" title="class or interface in java.lang.annotation">value</a>=<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/annotation/RetentionPolicy.html?is-external=true#RUNTIME" title="class or interface in java.lang.annotation">RUNTIME</a>) 89public @interface <span class="strong">JsonAutoDetect</span></pre> 90<div class="block">Class annotation that can be used to define which kinds of Methods 91 are to be detected by auto-detection. 92 Auto-detection means using name conventions 93 and/or signature templates to find methods to use for data binding. 94 For example, so-called "getters" can be auto-detected by looking for 95 public member methods that return a value, do not take argument, 96 and have prefix "get" in their name. 97<p> 98 Pseudo-value <code>NONE</code> means that all auto-detection is disabled 99 for the <b>specific</b> class that annotation is applied to (including 100 its super-types, but only when resolving that class). 101 Pseudo-value <code>ALWAYS</code> means that auto-detection is enabled 102 for all method types for the class in similar way. 103<p> 104 The default value is <code>ALWAYS</code>: that is, by default, auto-detection 105 is enabled for all classes unless instructed otherwise. 106<p> 107 Starting with version 1.5, it is also possible to use more fine-grained 108 definitions, to basically define minimum visibility level needed. Defaults 109 are different for different types (getters need to be public; setters can 110 have any access modifier, for example).</div> 111</li> 112</ul> 113</div> 114<div class="summary"> 115<ul class="blockList"> 116<li class="blockList"> 117<!-- =========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY =========== --> 118<ul class="blockList"> 119<li class="blockList"><a name="annotation_type_optional_element_summary"> 120<!-- --> 121</a> 122<h3>Optional Element Summary</h3> 123<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Optional Element Summary table, listing optional elements, and an explanation"> 124<caption><span>Optional Elements</span><span class="tabEnd"> </span></caption> 125<tr> 126<th class="colFirst" scope="col">Modifier and Type</th> 127<th class="colLast" scope="col">Optional Element and Description</th> 128</tr> 129<tr class="altColor"> 130<td class="colFirst"><code><a href="../../../../org/codehaus/jackson/annotate/JsonAutoDetect.Visibility.html" title="enum in org.codehaus.jackson.annotate">JsonAutoDetect.Visibility</a></code></td> 131<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/annotate/JsonAutoDetect.html#creatorVisibility()">creatorVisibility</a></strong></code> 132<div class="block">Minimum visibility required for auto-detecting Creator methods, 133 except for no-argument constructors (which are always detected 134 no matter what).</div> 135</td> 136</tr> 137<tr class="rowColor"> 138<td class="colFirst"><code><a href="../../../../org/codehaus/jackson/annotate/JsonAutoDetect.Visibility.html" title="enum in org.codehaus.jackson.annotate">JsonAutoDetect.Visibility</a></code></td> 139<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/annotate/JsonAutoDetect.html#fieldVisibility()">fieldVisibility</a></strong></code> 140<div class="block">Minimum visibility required for auto-detecting member fields.</div> 141</td> 142</tr> 143<tr class="altColor"> 144<td class="colFirst"><code><a href="../../../../org/codehaus/jackson/annotate/JsonAutoDetect.Visibility.html" title="enum in org.codehaus.jackson.annotate">JsonAutoDetect.Visibility</a></code></td> 145<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/annotate/JsonAutoDetect.html#getterVisibility()">getterVisibility</a></strong></code> 146<div class="block">Minimum visibility required for auto-detecting regular getter methods.</div> 147</td> 148</tr> 149<tr class="rowColor"> 150<td class="colFirst"><code><a href="../../../../org/codehaus/jackson/annotate/JsonAutoDetect.Visibility.html" title="enum in org.codehaus.jackson.annotate">JsonAutoDetect.Visibility</a></code></td> 151<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/annotate/JsonAutoDetect.html#isGetterVisibility()">isGetterVisibility</a></strong></code> 152<div class="block">Minimum visibility required for auto-detecting is-getter methods.</div> 153</td> 154</tr> 155<tr class="altColor"> 156<td class="colFirst"><code><a href="../../../../org/codehaus/jackson/annotate/JsonAutoDetect.Visibility.html" title="enum in org.codehaus.jackson.annotate">JsonAutoDetect.Visibility</a></code></td> 157<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/annotate/JsonAutoDetect.html#setterVisibility()">setterVisibility</a></strong></code> 158<div class="block">Minimum visibility required for auto-detecting setter methods.</div> 159</td> 160</tr> 161<tr class="rowColor"> 162<td class="colFirst"><code><a href="../../../../org/codehaus/jackson/annotate/JsonMethod.html" title="enum in org.codehaus.jackson.annotate">JsonMethod</a>[]</code></td> 163<td class="colLast"><code><strong><a href="../../../../org/codehaus/jackson/annotate/JsonAutoDetect.html#value()">value</a></strong></code> 164<div class="block">Types of property elements (getters, setters, fields, creators) that 165 can be auto-detected.</div> 166</td> 167</tr> 168</table> 169</li> 170</ul> 171</li> 172</ul> 173</div> 174<div class="details"> 175<ul class="blockList"> 176<li class="blockList"> 177<!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== --> 178<ul class="blockList"> 179<li class="blockList"><a name="annotation_type_element_detail"> 180<!-- --> 181</a> 182<h3>Element Detail</h3> 183<a name="value()"> 184<!-- --> 185</a> 186<ul class="blockList"> 187<li class="blockList"> 188<h4>value</h4> 189<pre>public abstract <a href="../../../../org/codehaus/jackson/annotate/JsonMethod.html" title="enum in org.codehaus.jackson.annotate">JsonMethod</a>[] value</pre> 190<div class="block">Types of property elements (getters, setters, fields, creators) that 191 can be auto-detected. 192 NOTE: as of 1.5, it is recommended that instead of defining this property, 193 distinct visibility properties are used instead. This because levels 194 used with this method are not explicit, but global defaults that differ for different 195 methods. As such, this property can be considered <b>deprecated</b> and 196 only retained for backwards compatibility.</div> 197<dl> 198<dt>Default:</dt> 199<dd>org.codehaus.jackson.annotate.JsonMethod.ALL</dd> 200</dl> 201</li> 202</ul> 203<a name="getterVisibility()"> 204<!-- --> 205</a> 206<ul class="blockList"> 207<li class="blockList"> 208<h4>getterVisibility</h4> 209<pre>public abstract <a href="../../../../org/codehaus/jackson/annotate/JsonAutoDetect.Visibility.html" title="enum in org.codehaus.jackson.annotate">JsonAutoDetect.Visibility</a> getterVisibility</pre> 210<div class="block">Minimum visibility required for auto-detecting regular getter methods.</div> 211<dl><dt><span class="strong">Since:</span></dt> 212 <dd>1.5</dd></dl> 213<dl> 214<dt>Default:</dt> 215<dd>org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.DEFAULT</dd> 216</dl> 217</li> 218</ul> 219<a name="isGetterVisibility()"> 220<!-- --> 221</a> 222<ul class="blockList"> 223<li class="blockList"> 224<h4>isGetterVisibility</h4> 225<pre>public abstract <a href="../../../../org/codehaus/jackson/annotate/JsonAutoDetect.Visibility.html" title="enum in org.codehaus.jackson.annotate">JsonAutoDetect.Visibility</a> isGetterVisibility</pre> 226<div class="block">Minimum visibility required for auto-detecting is-getter methods.</div> 227<dl><dt><span class="strong">Since:</span></dt> 228 <dd>1.5</dd></dl> 229<dl> 230<dt>Default:</dt> 231<dd>org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.DEFAULT</dd> 232</dl> 233</li> 234</ul> 235<a name="setterVisibility()"> 236<!-- --> 237</a> 238<ul class="blockList"> 239<li class="blockList"> 240<h4>setterVisibility</h4> 241<pre>public abstract <a href="../../../../org/codehaus/jackson/annotate/JsonAutoDetect.Visibility.html" title="enum in org.codehaus.jackson.annotate">JsonAutoDetect.Visibility</a> setterVisibility</pre> 242<div class="block">Minimum visibility required for auto-detecting setter methods.</div> 243<dl><dt><span class="strong">Since:</span></dt> 244 <dd>1.5</dd></dl> 245<dl> 246<dt>Default:</dt> 247<dd>org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.DEFAULT</dd> 248</dl> 249</li> 250</ul> 251<a name="creatorVisibility()"> 252<!-- --> 253</a> 254<ul class="blockList"> 255<li class="blockList"> 256<h4>creatorVisibility</h4> 257<pre>public abstract <a href="../../../../org/codehaus/jackson/annotate/JsonAutoDetect.Visibility.html" title="enum in org.codehaus.jackson.annotate">JsonAutoDetect.Visibility</a> creatorVisibility</pre> 258<div class="block">Minimum visibility required for auto-detecting Creator methods, 259 except for no-argument constructors (which are always detected 260 no matter what).</div> 261<dl><dt><span class="strong">Since:</span></dt> 262 <dd>1.5</dd></dl> 263<dl> 264<dt>Default:</dt> 265<dd>org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.DEFAULT</dd> 266</dl> 267</li> 268</ul> 269<a name="fieldVisibility()"> 270<!-- --> 271</a> 272<ul class="blockListLast"> 273<li class="blockList"> 274<h4>fieldVisibility</h4> 275<pre>public abstract <a href="../../../../org/codehaus/jackson/annotate/JsonAutoDetect.Visibility.html" title="enum in org.codehaus.jackson.annotate">JsonAutoDetect.Visibility</a> fieldVisibility</pre> 276<div class="block">Minimum visibility required for auto-detecting member fields.</div> 277<dl><dt><span class="strong">Since:</span></dt> 278 <dd>1.5</dd></dl> 279<dl> 280<dt>Default:</dt> 281<dd>org.codehaus.jackson.annotate.JsonAutoDetect.Visibility.DEFAULT</dd> 282</dl> 283</li> 284</ul> 285</li> 286</ul> 287</li> 288</ul> 289</div> 290</div> 291<!-- ========= END OF CLASS DATA ========= --> 292<!-- ======= START OF BOTTOM NAVBAR ====== --> 293<div class="bottomNav"><a name="navbar_bottom"> 294<!-- --> 295</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> 296<!-- --> 297</a> 298<ul class="navList" title="Navigation"> 299<li><a href="../../../../overview-summary.html">Overview</a></li> 300<li><a href="package-summary.html">Package</a></li> 301<li class="navBarCell1Rev">Class</li> 302<li><a href="class-use/JsonAutoDetect.html">Use</a></li> 303<li><a href="package-tree.html">Tree</a></li> 304<li><a href="../../../../deprecated-list.html">Deprecated</a></li> 305<li><a href="../../../../index-all.html">Index</a></li> 306<li><a href="../../../../help-doc.html">Help</a></li> 307</ul> 308</div> 309<div class="subNav"> 310<ul class="navList"> 311<li><a href="../../../../org/codehaus/jackson/annotate/JsonAnySetter.html" title="annotation in org.codehaus.jackson.annotate"><span class="strong">Prev Class</span></a></li> 312<li><a href="../../../../org/codehaus/jackson/annotate/JsonAutoDetect.Visibility.html" title="enum in org.codehaus.jackson.annotate"><span class="strong">Next Class</span></a></li> 313</ul> 314<ul class="navList"> 315<li><a href="../../../../index.html?org/codehaus/jackson/annotate/JsonAutoDetect.html" target="_top">Frames</a></li> 316<li><a href="JsonAutoDetect.html" target="_top">No Frames</a></li> 317</ul> 318<ul class="navList" id="allclasses_navbar_bottom"> 319<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> 320</ul> 321<div> 322<script type="text/javascript"><!-- 323 allClassesLink = document.getElementById("allclasses_navbar_bottom"); 324 if(window==top) { 325 allClassesLink.style.display = "block"; 326 } 327 else { 328 allClassesLink.style.display = "none"; 329 } 330 //--> 331</script> 332</div> 333<div> 334<ul class="subNavList"> 335<li>Summary: </li> 336<li>Required | </li> 337<li><a href="#annotation_type_optional_element_summary">Optional</a></li> 338</ul> 339<ul class="subNavList"> 340<li>Detail: </li> 341<li><a href="#annotation_type_element_detail">Element</a></li> 342</ul> 343</div> 344<a name="skip-navbar_bottom"> 345<!-- --> 346</a></div> 347<!-- ======== END OF BOTTOM NAVBAR ======= --> 348</body> 349</html> 350