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 Tue Jan 23 20:10:06 PST 2018 --> 6<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 7<title>JsonAnyGetter (Jackson-annotations 2.9.0 API)</title> 8<meta name="date" content="2018-01-23"> 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="JsonAnyGetter (Jackson-annotations 2.9.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="../../../../com/fasterxml/jackson/annotation/package-summary.html">Package</a></li> 29<li class="navBarCell1Rev">Class</li> 30<li><a href="class-use/JsonAnyGetter.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="../../../../com/fasterxml/jackson/annotation/JsonAlias.html" title="annotation in com.fasterxml.jackson.annotation"><span class="strong">Prev Class</span></a></li> 40<li><a href="../../../../com/fasterxml/jackson/annotation/JsonAnySetter.html" title="annotation in com.fasterxml.jackson.annotation"><span class="strong">Next Class</span></a></li> 41</ul> 42<ul class="navList"> 43<li><a href="../../../../index.html?com/fasterxml/jackson/annotation/JsonAnyGetter.html" target="_top">Frames</a></li> 44<li><a href="JsonAnyGetter.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">com.fasterxml.jackson.annotation</div> 79<h2 title="Annotation Type JsonAnyGetter" class="title">Annotation Type JsonAnyGetter</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#ANNOTATION_TYPE" title="class or interface in java.lang.annotation">ANNOTATION_TYPE</a>,<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/annotation/ElementType.html?is-external=true#METHOD" title="class or interface in java.lang.annotation">METHOD</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">JsonAnyGetter</span></pre> 90<div class="block">Marker annotation that can be used to define a non-static, 91 no-argument method to be an "any getter"; accessor for getting 92 a set of key/value pairs, to be serialized as part of containing POJO 93 (similar to unwrapping) along with regular property values it has. 94 This typically serves as a counterpart 95 to "any setter" mutators (see <a href="../../../../com/fasterxml/jackson/annotation/JsonAnySetter.html" title="annotation in com.fasterxml.jackson.annotation"><code>JsonAnySetter</code></a>). 96 Note that the return type of annotated methods <b>must</b> be 97 <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util"><code>Map</code></a>). 98<p> 99 As with <a href="../../../../com/fasterxml/jackson/annotation/JsonAnySetter.html" title="annotation in com.fasterxml.jackson.annotation"><code>JsonAnySetter</code></a>, only one property should be annotated 100 with this annotation; if multiple methods are annotated, an exception 101 may be thrown.</div> 102</li> 103</ul> 104</div> 105<div class="summary"> 106<ul class="blockList"> 107<li class="blockList"> 108<!-- =========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY =========== --> 109<ul class="blockList"> 110<li class="blockList"><a name="annotation_type_optional_element_summary"> 111<!-- --> 112</a> 113<h3>Optional Element Summary</h3> 114<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Optional Element Summary table, listing optional elements, and an explanation"> 115<caption><span>Optional Elements</span><span class="tabEnd"> </span></caption> 116<tr> 117<th class="colFirst" scope="col">Modifier and Type</th> 118<th class="colLast" scope="col">Optional Element and Description</th> 119</tr> 120<tr class="altColor"> 121<td class="colFirst"><code>boolean</code></td> 122<td class="colLast"><code><strong><a href="../../../../com/fasterxml/jackson/annotation/JsonAnyGetter.html#enabled()">enabled</a></strong></code> 123<div class="block">Optional argument that defines whether this annotation is active 124 or not.</div> 125</td> 126</tr> 127</table> 128</li> 129</ul> 130</li> 131</ul> 132</div> 133<div class="details"> 134<ul class="blockList"> 135<li class="blockList"> 136<!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== --> 137<ul class="blockList"> 138<li class="blockList"><a name="annotation_type_element_detail"> 139<!-- --> 140</a> 141<h3>Element Detail</h3> 142<a name="enabled()"> 143<!-- --> 144</a> 145<ul class="blockListLast"> 146<li class="blockList"> 147<h4>enabled</h4> 148<pre>public abstract boolean enabled</pre> 149<div class="block">Optional argument that defines whether this annotation is active 150 or not. The only use for value 'false' if for overriding purposes. 151 Overriding may be necessary when used 152 with "mix-in annotations" (aka "annotation overrides"). 153 For most cases, however, default value of "true" is just fine 154 and should be omitted.</div> 155<dl><dt><span class="strong">Since:</span></dt> 156 <dd>2.9</dd></dl> 157<dl> 158<dt>Default:</dt> 159<dd>true</dd> 160</dl> 161</li> 162</ul> 163</li> 164</ul> 165</li> 166</ul> 167</div> 168</div> 169<!-- ========= END OF CLASS DATA ========= --> 170<!-- ======= START OF BOTTOM NAVBAR ====== --> 171<div class="bottomNav"><a name="navbar_bottom"> 172<!-- --> 173</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> 174<!-- --> 175</a> 176<ul class="navList" title="Navigation"> 177<li><a href="../../../../com/fasterxml/jackson/annotation/package-summary.html">Package</a></li> 178<li class="navBarCell1Rev">Class</li> 179<li><a href="class-use/JsonAnyGetter.html">Use</a></li> 180<li><a href="package-tree.html">Tree</a></li> 181<li><a href="../../../../deprecated-list.html">Deprecated</a></li> 182<li><a href="../../../../index-all.html">Index</a></li> 183<li><a href="../../../../help-doc.html">Help</a></li> 184</ul> 185</div> 186<div class="subNav"> 187<ul class="navList"> 188<li><a href="../../../../com/fasterxml/jackson/annotation/JsonAlias.html" title="annotation in com.fasterxml.jackson.annotation"><span class="strong">Prev Class</span></a></li> 189<li><a href="../../../../com/fasterxml/jackson/annotation/JsonAnySetter.html" title="annotation in com.fasterxml.jackson.annotation"><span class="strong">Next Class</span></a></li> 190</ul> 191<ul class="navList"> 192<li><a href="../../../../index.html?com/fasterxml/jackson/annotation/JsonAnyGetter.html" target="_top">Frames</a></li> 193<li><a href="JsonAnyGetter.html" target="_top">No Frames</a></li> 194</ul> 195<ul class="navList" id="allclasses_navbar_bottom"> 196<li><a href="../../../../allclasses-noframe.html">All Classes</a></li> 197</ul> 198<div> 199<script type="text/javascript"><!-- 200 allClassesLink = document.getElementById("allclasses_navbar_bottom"); 201 if(window==top) { 202 allClassesLink.style.display = "block"; 203 } 204 else { 205 allClassesLink.style.display = "none"; 206 } 207 //--> 208</script> 209</div> 210<div> 211<ul class="subNavList"> 212<li>Summary: </li> 213<li>Required | </li> 214<li><a href="#annotation_type_optional_element_summary">Optional</a></li> 215</ul> 216<ul class="subNavList"> 217<li>Detail: </li> 218<li><a href="#annotation_type_element_detail">Element</a></li> 219</ul> 220</div> 221<a name="skip-navbar_bottom"> 222<!-- --> 223</a></div> 224<!-- ======== END OF BOTTOM NAVBAR ======= --> 225<p class="legalCopy"><small>Copyright © 2008–2018 <a href="http://fasterxml.com/">FasterXML</a>. All rights reserved.</small></p> 226</body> 227</html> 228