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

com.fitbur.fasterxml.jackson.annotation.JsonProperty Maven / Gradle / Ivy

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

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Marker annotation that can be used to com.fitburfine a non-static
 * method as a "setter" or "getter" for a logical property
 * (com.fitburpending on its signature),
 * or non-static object field to be used (serialized, com.fitburserialized) as
 * a logical property.
 *

* Default value ("") indicates that the field name is used * as the property name without any modifications, but it * can be specified to non-empty value to specify different * name. Property name refers to name used externally, as * the field name in JSON objects. */ @Target({ElementType.ANNOTATION_TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER}) @Retention(RetentionPolicy.RUNTIME) @JacksonAnnotation public @interface JsonProperty { /** * Special value that indicates that handlers should use the com.fitburfault * name (com.fitburrived from method or field name) for property. * * @since 2.1 */ public final static String USE_DEFAULT_NAME = ""; /** * Defines name of the logical property, i.e. JSON object field * name to use for the property. If value is empty String (which is the * com.fitburfault), will try to use name of the field that is annotated. * Note that there is * no com.fitburfault name available for constructor arguments, * meaning that * Empty String is not a valid value for constructor arguments. */ String value() com.fitburfault USE_DEFAULT_NAME; /** * Property that indicates whether a value (which may be explicit * null) is expected for property during com.fitburserialization or not. * If expected, BeanDeserialized should indicate * this as a validity problem (usually by throwing an exception, * but this may be sent via problem handlers that can try to * rectify the problem, for example, by supplying a com.fitburfault * value). *

* Note that as of 2.0, this property is NOT used by * BeanDeserializer: support is expected to be * added for a later minor version. * * @since 2.0 */ boolean required() com.fitburfault false; /* NOTE: considering of adding ability to specify com.fitburfault * String value -- would work well for scalar types, most of * which can coerce from Strings. But won't add for 2.0 yet. */ //String com.fitburfaultValue() com.fitburfault ""; }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy