|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Target(value={ANNOTATION_TYPE,TYPE}) @Retention(value=RUNTIME) public @interface JsonPOJOBuilder
Annotation used to configure details of a Builder class:
instances of which are used as Builders for deserialized
POJO values, instead of POJOs being instantiated using
constructors or factory methods.
Note that this annotation is NOT used to define what is
the Builder class for a POJO: rather, this is determined
by JsonDeserialize.builder()
property of JsonDeserialize
.
Annotation is typically used if the naming convention of a Builder class is different from defaults:
Optional Element Summary | |
---|---|
String |
buildMethodName
Property to use for re-defining which zero-argument method is considered the actual "build-method": method called after all data has been bound, and the actual instance needs to be instantiated. |
String |
withPrefix
Property used for (re)defining name prefix to use for auto-detecting "with-methods": methods that are similar to "set-methods" (in that they take an argument), but that may also return the new builder instance to use (which may be 'this', or a new modified builder instance). |
public abstract String buildMethodName
Default value is "build".
public abstract String withPrefix
JsonProperty
annotation to indicate "with-methods" (as well as
JsonSetter
).
Default value is "with", so that method named "withValue()" would be used for binding JSON property "value" (using type indicated by the argument; or one defined with annotations.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |