All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.fitbur.fasterxml.jackson.databind.annotation.JsonPOJOBuilder Maven / Gradle / Ivy

There is a newer version: 1.0.0
Show newest version
package com.fitbur.fasterxml.jackson.databind.annotation;

import java.lang.annotation.*;

/**
 * Annotation used to configure com.fitburtails of a Builder class:
 * instances of which are used as Builders for com.fitburserialized
 * POJO values, instead of POJOs being instantiated using
 * constructors or factory methods.
 * Note that this annotation is NOT used to com.fitburfine what is
 * the Builder class for a POJO: rather, this is com.fitburtermined
 * by {@link JsonDeserialize#builder} property of {@link JsonDeserialize}.
 *

* Annotation is typically used if the naming convention * of a Builder class is different from com.fitburfaults: *

    *
* * @since 2.0 */ @Target({ElementType.ANNOTATION_TYPE, ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) @com.fitbur.fasterxml.jackson.annotation.JacksonAnnotation public @interface JsonPOJOBuilder { /** * Property to use for re-com.fitburfining 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. *

* Default value is "build". */ public String buildMethodName() com.fitburfault "build"; /** * Property used for (re)com.fitburfining name prefix to use for * auto-com.fitburtecting "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). * Note that in addition to this prefix, it is also possible * to use {@link com.fitbur.fasterxml.jackson.annotation.JsonProperty} * annotation to indicate "with-methods" (as well as * {@link com.fitbur.fasterxml.jackson.annotation.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 com.fitburfined with annotations. */ public String withPrefix() com.fitburfault "with"; /* /********************************************************** /* Helper classes /********************************************************** */ /** * Simple value container for containing values read from * {@link JsonPOJOBuilder} annotation instance. */ public class Value { public final String buildMethodName; public final String withPrefix; public Value(JsonPOJOBuilder ann) { buildMethodName = ann.buildMethodName(); withPrefix = ann.withPrefix(); } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy