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 Wed Jul 20 08:39:10 PDT 2016 --> 6<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 7<title>JsonPOJOBuilder (jackson-databind 2.8.0 API)</title> 8<meta name="date" content="2016-07-20"> 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="JsonPOJOBuilder (jackson-databind 2.8.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="../../../../../overview-summary.html">Overview</a></li> 29<li><a href="package-summary.html">Package</a></li> 30<li class="navBarCell1Rev">Class</li> 31<li><a href="class-use/JsonPOJOBuilder.html">Use</a></li> 32<li><a href="package-tree.html">Tree</a></li> 33<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> 34<li><a href="../../../../../index-all.html">Index</a></li> 35<li><a href="../../../../../help-doc.html">Help</a></li> 36</ul> 37</div> 38<div class="subNav"> 39<ul class="navList"> 40<li><a href="../../../../../com/fasterxml/jackson/databind/annotation/JsonNaming.html" title="annotation in com.fasterxml.jackson.databind.annotation"><span class="strong">Prev Class</span></a></li> 41<li><a href="../../../../../com/fasterxml/jackson/databind/annotation/JsonPOJOBuilder.Value.html" title="class in com.fasterxml.jackson.databind.annotation"><span class="strong">Next Class</span></a></li> 42</ul> 43<ul class="navList"> 44<li><a href="../../../../../index.html?com/fasterxml/jackson/databind/annotation/JsonPOJOBuilder.html" target="_top">Frames</a></li> 45<li><a href="JsonPOJOBuilder.html" target="_top">No Frames</a></li> 46</ul> 47<ul class="navList" id="allclasses_navbar_top"> 48<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> 49</ul> 50<div> 51<script type="text/javascript"><!-- 52 allClassesLink = document.getElementById("allclasses_navbar_top"); 53 if(window==top) { 54 allClassesLink.style.display = "block"; 55 } 56 else { 57 allClassesLink.style.display = "none"; 58 } 59 //--> 60</script> 61</div> 62<div> 63<ul class="subNavList"> 64<li>Summary: </li> 65<li>Required | </li> 66<li><a href="#annotation_type_optional_element_summary">Optional</a></li> 67</ul> 68<ul class="subNavList"> 69<li>Detail: </li> 70<li><a href="#annotation_type_element_detail">Element</a></li> 71</ul> 72</div> 73<a name="skip-navbar_top"> 74<!-- --> 75</a></div> 76<!-- ========= END OF TOP NAVBAR ========= --> 77<!-- ======== START OF CLASS DATA ======== --> 78<div class="header"> 79<div class="subTitle">com.fasterxml.jackson.databind.annotation</div> 80<h2 title="Annotation Type JsonPOJOBuilder" class="title">Annotation Type JsonPOJOBuilder</h2> 81</div> 82<div class="contentContainer"> 83<div class="description"> 84<ul class="blockList"> 85<li class="blockList"> 86<hr> 87<br> 88<pre><a href="http://docs.oracle.com/javase/7/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/7/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/7/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/7/docs/api/java/lang/annotation/ElementType.html?is-external=true#TYPE" title="class or interface in java.lang.annotation">TYPE</a>}) 89<a href="http://docs.oracle.com/javase/7/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/7/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/7/docs/api/java/lang/annotation/RetentionPolicy.html?is-external=true#RUNTIME" title="class or interface in java.lang.annotation">RUNTIME</a>) 90public @interface <span class="strong">JsonPOJOBuilder</span></pre> 91<div class="block">Annotation used to configure details of a Builder class: 92 instances of which are used as Builders for deserialized 93 POJO values, instead of POJOs being instantiated using 94 constructors or factory methods. 95 Note that this annotation is NOT used to define what is 96 the Builder class for a POJO: rather, this is determined 97 by <a href="../../../../../com/fasterxml/jackson/databind/annotation/JsonDeserialize.html#builder()"><code>JsonDeserialize.builder()</code></a> property of <a href="../../../../../com/fasterxml/jackson/databind/annotation/JsonDeserialize.html" title="annotation in com.fasterxml.jackson.databind.annotation"><code>JsonDeserialize</code></a>. 98<p> 99 Annotation is typically used if the naming convention 100 of a Builder class is different from defaults: 101<ul> 102 <li>By default, setters are expected to have names like `withName()` (for property "name"); 103 override by <a href="../../../../../com/fasterxml/jackson/databind/annotation/JsonPOJOBuilder.html#withPrefix()"><code>withPrefix()</code></a> property. 104 </li> 105 </ul> 106<p> 107 In addition to configuration using this annotation, note that many other configuration 108 annotations are also applied to Builders, for example 109 <a href="http://fasterxml.github.com/jackson-annotations/javadoc/2.7/com/fasterxml/jackson/annotation/JsonIgnoreProperties.html?is-external=true" title="class or interface in com.fasterxml.jackson.annotation"><code>JsonIgnoreProperties</code></a> can be used to ignore 110 "unknown" properties.</div> 111<dl><dt><span class="strong">Since:</span></dt> 112 <dd>2.0</dd></dl> 113</li> 114</ul> 115</div> 116<div class="summary"> 117<ul class="blockList"> 118<li class="blockList"> 119<!-- =========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY =========== --> 120<ul class="blockList"> 121<li class="blockList"><a name="annotation_type_optional_element_summary"> 122<!-- --> 123</a> 124<h3>Optional Element Summary</h3> 125<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Optional Element Summary table, listing optional elements, and an explanation"> 126<caption><span>Optional Elements</span><span class="tabEnd"> </span></caption> 127<tr> 128<th class="colFirst" scope="col">Modifier and Type</th> 129<th class="colLast" scope="col">Optional Element and Description</th> 130</tr> 131<tr class="altColor"> 132<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> 133<td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/databind/annotation/JsonPOJOBuilder.html#buildMethodName()">buildMethodName</a></strong></code> 134<div class="block">Property to use for re-defining which zero-argument method 135 is considered the actual "build-method": method called after 136 all data has been bound, and the actual instance needs to 137 be instantiated.</div> 138</td> 139</tr> 140<tr class="rowColor"> 141<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> 142<td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/databind/annotation/JsonPOJOBuilder.html#withPrefix()">withPrefix</a></strong></code> 143<div class="block">Property used for (re)defining name prefix to use for 144 auto-detecting "with-methods": methods that are similar to 145 "set-methods" (in that they take an argument), but that 146 may also return the new builder instance to use 147 (which may be 'this', or a new modified builder instance).</div> 148</td> 149</tr> 150</table> 151</li> 152</ul> 153</li> 154</ul> 155</div> 156<div class="details"> 157<ul class="blockList"> 158<li class="blockList"> 159<!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== --> 160<ul class="blockList"> 161<li class="blockList"><a name="annotation_type_element_detail"> 162<!-- --> 163</a> 164<h3>Element Detail</h3> 165<a name="buildMethodName()"> 166<!-- --> 167</a> 168<ul class="blockList"> 169<li class="blockList"> 170<h4>buildMethodName</h4> 171<pre>public abstract <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> buildMethodName</pre> 172<div class="block">Property to use for re-defining which zero-argument method 173 is considered the actual "build-method": method called after 174 all data has been bound, and the actual instance needs to 175 be instantiated. 176<p> 177 Default value is "build".</div> 178<dl> 179<dt>Default:</dt> 180<dd>"build"</dd> 181</dl> 182</li> 183</ul> 184<a name="withPrefix()"> 185<!-- --> 186</a> 187<ul class="blockListLast"> 188<li class="blockList"> 189<h4>withPrefix</h4> 190<pre>public abstract <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> withPrefix</pre> 191<div class="block">Property used for (re)defining name prefix to use for 192 auto-detecting "with-methods": methods that are similar to 193 "set-methods" (in that they take an argument), but that 194 may also return the new builder instance to use 195 (which may be 'this', or a new modified builder instance). 196 Note that in addition to this prefix, it is also possible 197 to use <a href="http://fasterxml.github.com/jackson-annotations/javadoc/2.7/com/fasterxml/jackson/annotation/JsonProperty.html?is-external=true" title="class or interface in com.fasterxml.jackson.annotation"><code>JsonProperty</code></a> 198 annotation to indicate "with-methods" (as well as 199 <a href="http://fasterxml.github.com/jackson-annotations/javadoc/2.7/com/fasterxml/jackson/annotation/JsonSetter.html?is-external=true" title="class or interface in com.fasterxml.jackson.annotation"><code>JsonSetter</code></a>). 200<p> 201 Default value is "with", so that method named "withValue()" 202 would be used for binding JSON property "value" (using type 203 indicated by the argument; or one defined with annotations.</div> 204<dl> 205<dt>Default:</dt> 206<dd>"with"</dd> 207</dl> 208</li> 209</ul> 210</li> 211</ul> 212</li> 213</ul> 214</div> 215</div> 216<!-- ========= END OF CLASS DATA ========= --> 217<!-- ======= START OF BOTTOM NAVBAR ====== --> 218<div class="bottomNav"><a name="navbar_bottom"> 219<!-- --> 220</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> 221<!-- --> 222</a> 223<ul class="navList" title="Navigation"> 224<li><a href="../../../../../overview-summary.html">Overview</a></li> 225<li><a href="package-summary.html">Package</a></li> 226<li class="navBarCell1Rev">Class</li> 227<li><a href="class-use/JsonPOJOBuilder.html">Use</a></li> 228<li><a href="package-tree.html">Tree</a></li> 229<li><a href="../../../../../deprecated-list.html">Deprecated</a></li> 230<li><a href="../../../../../index-all.html">Index</a></li> 231<li><a href="../../../../../help-doc.html">Help</a></li> 232</ul> 233</div> 234<div class="subNav"> 235<ul class="navList"> 236<li><a href="../../../../../com/fasterxml/jackson/databind/annotation/JsonNaming.html" title="annotation in com.fasterxml.jackson.databind.annotation"><span class="strong">Prev Class</span></a></li> 237<li><a href="../../../../../com/fasterxml/jackson/databind/annotation/JsonPOJOBuilder.Value.html" title="class in com.fasterxml.jackson.databind.annotation"><span class="strong">Next Class</span></a></li> 238</ul> 239<ul class="navList"> 240<li><a href="../../../../../index.html?com/fasterxml/jackson/databind/annotation/JsonPOJOBuilder.html" target="_top">Frames</a></li> 241<li><a href="JsonPOJOBuilder.html" target="_top">No Frames</a></li> 242</ul> 243<ul class="navList" id="allclasses_navbar_bottom"> 244<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> 245</ul> 246<div> 247<script type="text/javascript"><!-- 248 allClassesLink = document.getElementById("allclasses_navbar_bottom"); 249 if(window==top) { 250 allClassesLink.style.display = "block"; 251 } 252 else { 253 allClassesLink.style.display = "none"; 254 } 255 //--> 256</script> 257</div> 258<div> 259<ul class="subNavList"> 260<li>Summary: </li> 261<li>Required | </li> 262<li><a href="#annotation_type_optional_element_summary">Optional</a></li> 263</ul> 264<ul class="subNavList"> 265<li>Detail: </li> 266<li><a href="#annotation_type_element_detail">Element</a></li> 267</ul> 268</div> 269<a name="skip-navbar_bottom"> 270<!-- --> 271</a></div> 272<!-- ======== END OF BOTTOM NAVBAR ======= --> 273<p class="legalCopy"><small>Copyright © 2008–2016 <a href="http://fasterxml.com/">FasterXML</a>. All rights reserved.</small></p> 274</body> 275</html> 276