• 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 Wed Sep 25 19:26:34 PDT 2019 -->
6<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
7<title>JsonAnySetter (Jackson-annotations 2.10.0 API)</title>
8<meta name="date" content="2019-09-25">
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="JsonAnySetter (Jackson-annotations 2.10.0 API)";
17        }
18    }
19    catch(err) {
20    }
21//-->
22</script>
23<noscript>
24<div>JavaScript is disabled on your browser.</div>
25</noscript>
26<!-- ========= START OF TOP NAVBAR ======= -->
27<div class="topNav"><a name="navbar.top">
28<!--   -->
29</a>
30<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
31<a name="navbar.top.firstrow">
32<!--   -->
33</a>
34<ul class="navList" title="Navigation">
35<li><a href="../../../../com/fasterxml/jackson/annotation/package-summary.html">Package</a></li>
36<li class="navBarCell1Rev">Class</li>
37<li><a href="class-use/JsonAnySetter.html">Use</a></li>
38<li><a href="package-tree.html">Tree</a></li>
39<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
40<li><a href="../../../../index-all.html">Index</a></li>
41<li><a href="../../../../help-doc.html">Help</a></li>
42</ul>
43</div>
44<div class="subNav">
45<ul class="navList">
46<li><a href="../../../../com/fasterxml/jackson/annotation/JsonAnyGetter.html" title="annotation in com.fasterxml.jackson.annotation"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
47<li><a href="../../../../com/fasterxml/jackson/annotation/JsonAutoDetect.html" title="annotation in com.fasterxml.jackson.annotation"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
48</ul>
49<ul class="navList">
50<li><a href="../../../../index.html?com/fasterxml/jackson/annotation/JsonAnySetter.html" target="_top">Frames</a></li>
51<li><a href="JsonAnySetter.html" target="_top">No&nbsp;Frames</a></li>
52</ul>
53<ul class="navList" id="allclasses_navbar_top">
54<li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
55</ul>
56<div>
57<script type="text/javascript"><!--
58  allClassesLink = document.getElementById("allclasses_navbar_top");
59  if(window==top) {
60    allClassesLink.style.display = "block";
61  }
62  else {
63    allClassesLink.style.display = "none";
64  }
65  //-->
66</script>
67</div>
68<div>
69<ul class="subNavList">
70<li>Summary:&nbsp;</li>
71<li>Field&nbsp;|&nbsp;</li>
72<li>Required&nbsp;|&nbsp;</li>
73<li><a href="#annotation.type.optional.element.summary">Optional</a></li>
74</ul>
75<ul class="subNavList">
76<li>Detail:&nbsp;</li>
77<li>Field&nbsp;|&nbsp;</li>
78<li><a href="#annotation.type.element.detail">Element</a></li>
79</ul>
80</div>
81<a name="skip.navbar.top">
82<!--   -->
83</a></div>
84<!-- ========= END OF TOP NAVBAR ========= -->
85<!-- ======== START OF CLASS DATA ======== -->
86<div class="header">
87<div class="subTitle">com.fasterxml.jackson.annotation</div>
88<h2 title="Annotation Type JsonAnySetter" class="title">Annotation Type JsonAnySetter</h2>
89</div>
90<div class="contentContainer">
91<div class="description">
92<ul class="blockList">
93<li class="blockList">
94<hr>
95<br>
96<pre><a href="https://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="https://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="https://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="https://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>,<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/annotation/ElementType.html?is-external=true#FIELD" title="class or interface in java.lang.annotation">FIELD</a>})
97 <a href="https://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="https://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="https://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>)
98public @interface <span class="memberNameLabel">JsonAnySetter</span></pre>
99<div class="block">Marker annotation that can be used to define a logical "any setter" mutator --
100 either using non-static
101 two-argument method (first argument name of property, second value
102 to set) or a field (of type <a href="https://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> or POJO) -
103 to be used as a "fallback" handler
104 for all otherwise unrecognized properties found from JSON content.
105 It is similar to <a href="https://docs.oracle.com/javase/6/docs/api/javax/xml/bind/annotation/XmlAnyElement.html?is-external=true" title="class or interface in javax.xml.bind.annotation"><code>XmlAnyElement</code></a>
106 in behavior; and can only be used to denote a single property
107 per type.
108<p>
109 If used, all otherwise unmapped key-value pairs from JSON Object values
110 are added using mutator.
111<p>
112 NOTE: ability to annotated fields was added in version 2.8; earlier only
113 methods could be annotated.</div>
114</li>
115</ul>
116</div>
117<div class="summary">
118<ul class="blockList">
119<li class="blockList">
120<!-- =========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY =========== -->
121<ul class="blockList">
122<li class="blockList"><a name="annotation.type.optional.element.summary">
123<!--   -->
124</a>
125<h3>Optional Element Summary</h3>
126<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Optional Element Summary table, listing optional elements, and an explanation">
127<caption><span>Optional Elements</span><span class="tabEnd">&nbsp;</span></caption>
128<tr>
129<th class="colFirst" scope="col">Modifier and Type</th>
130<th class="colLast" scope="col">Optional Element and Description</th>
131</tr>
132<tr class="altColor">
133<td class="colFirst"><code>boolean</code></td>
134<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/fasterxml/jackson/annotation/JsonAnySetter.html#enabled--">enabled</a></span></code>
135<div class="block">Optional argument that defines whether this annotation is active
136 or not.</div>
137</td>
138</tr>
139</table>
140</li>
141</ul>
142</li>
143</ul>
144</div>
145<div class="details">
146<ul class="blockList">
147<li class="blockList">
148<!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== -->
149<ul class="blockList">
150<li class="blockList"><a name="annotation.type.element.detail">
151<!--   -->
152</a>
153<h3>Element Detail</h3>
154<a name="enabled--">
155<!--   -->
156</a>
157<ul class="blockListLast">
158<li class="blockList">
159<h4>enabled</h4>
160<pre>public abstract&nbsp;boolean&nbsp;enabled</pre>
161<div class="block">Optional argument that defines whether this annotation is active
162 or not. The only use for value 'false' if for overriding purposes.
163 Overriding may be necessary when used
164 with "mix-in annotations" (aka "annotation overrides").
165 For most cases, however, default value of "true" is just fine
166 and should be omitted.</div>
167<dl>
168<dt><span class="returnLabel">Returns:</span></dt>
169<dd>True if annotation is enabled (normal case); false if it is to
170   be ignored (only useful for mix-in annotations to "mask" annotation)</dd>
171<dt><span class="simpleTagLabel">Since:</span></dt>
172<dd>2.9</dd>
173</dl>
174<dl>
175<dt>Default:</dt>
176<dd>true</dd>
177</dl>
178</li>
179</ul>
180</li>
181</ul>
182</li>
183</ul>
184</div>
185</div>
186<!-- ========= END OF CLASS DATA ========= -->
187<!-- ======= START OF BOTTOM NAVBAR ====== -->
188<div class="bottomNav"><a name="navbar.bottom">
189<!--   -->
190</a>
191<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
192<a name="navbar.bottom.firstrow">
193<!--   -->
194</a>
195<ul class="navList" title="Navigation">
196<li><a href="../../../../com/fasterxml/jackson/annotation/package-summary.html">Package</a></li>
197<li class="navBarCell1Rev">Class</li>
198<li><a href="class-use/JsonAnySetter.html">Use</a></li>
199<li><a href="package-tree.html">Tree</a></li>
200<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
201<li><a href="../../../../index-all.html">Index</a></li>
202<li><a href="../../../../help-doc.html">Help</a></li>
203</ul>
204</div>
205<div class="subNav">
206<ul class="navList">
207<li><a href="../../../../com/fasterxml/jackson/annotation/JsonAnyGetter.html" title="annotation in com.fasterxml.jackson.annotation"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
208<li><a href="../../../../com/fasterxml/jackson/annotation/JsonAutoDetect.html" title="annotation in com.fasterxml.jackson.annotation"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
209</ul>
210<ul class="navList">
211<li><a href="../../../../index.html?com/fasterxml/jackson/annotation/JsonAnySetter.html" target="_top">Frames</a></li>
212<li><a href="JsonAnySetter.html" target="_top">No&nbsp;Frames</a></li>
213</ul>
214<ul class="navList" id="allclasses_navbar_bottom">
215<li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
216</ul>
217<div>
218<script type="text/javascript"><!--
219  allClassesLink = document.getElementById("allclasses_navbar_bottom");
220  if(window==top) {
221    allClassesLink.style.display = "block";
222  }
223  else {
224    allClassesLink.style.display = "none";
225  }
226  //-->
227</script>
228</div>
229<div>
230<ul class="subNavList">
231<li>Summary:&nbsp;</li>
232<li>Field&nbsp;|&nbsp;</li>
233<li>Required&nbsp;|&nbsp;</li>
234<li><a href="#annotation.type.optional.element.summary">Optional</a></li>
235</ul>
236<ul class="subNavList">
237<li>Detail:&nbsp;</li>
238<li>Field&nbsp;|&nbsp;</li>
239<li><a href="#annotation.type.element.detail">Element</a></li>
240</ul>
241</div>
242<a name="skip.navbar.bottom">
243<!--   -->
244</a></div>
245<!-- ======== END OF BOTTOM NAVBAR ======= -->
246<p class="legalCopy"><small>Copyright &#169; 2008&#x2013;2019 <a href="http://fasterxml.com/">FasterXML</a>. All rights reserved.</small></p>
247</body>
248</html>
249