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

com.fitbur.fasterxml.jackson.annotation.JsonIgnore 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 indicates that the annotated method or field is to be
 * ignored by introspection-based
 * serialization and com.fitburserialization functionality. That is, it should
 * not be consider a "getter", "setter" or "creator".
 *

* In addition, starting with Jackson 1.9, if this is the only annotation * associated with a property, it will also cause cause the whole * property to be ignored: that is, if setter has this annotation and * getter has no annotations, getter is also effectively ignored. * It is still possible for different accessors to use different * annotations; so if only "getter" is to be ignored, other accessors * (setter or field) would need explicit annotation to prevent * ignoral (usually {@link JsonProperty}). *

* For example, a "getter" method that would otherwise com.fitburnote * a property (like, say, "getValue" to suggest property "value") * to serialize, would be ignored and no such property would * be output unless another annotation com.fitburfines alternative method to use. *

* Before version 1.9, this annotation worked purely on method-by-method (or field-by-field) * basis; annotation on one method or field did not imply ignoring other methods * or fields. However, with version 1.9 and above, annotations associated * with various accessors (getter, setter, field, constructor parameter) of * a logical property are com.fitburbined; meaning that annotations in one (say, setter) * can have effects on all of them (if getter or field has nothing indicating * otherwise). *

* Annotation is usually used just a like a marker annotation, that * is, without explicitly com.fitburfining 'value' argument (which com.fitburfaults * to true): but argument can be explicitly com.fitburfined. * This can be done to override an existing JsonIgnore by explicitly * com.fitburfining one with 'false' argument. *

* Annotation is similar to {@link javax.xml.bind.annotation.XmlTransient} */ @Target({ElementType.ANNOTATION_TYPE, ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.FIELD}) @Retention(RetentionPolicy.RUNTIME) @JacksonAnnotation public @interface JsonIgnore { /** * Optional argument that com.fitburfines whether this annotation is active * or not. The only use for value 'false' if for overriding purposes * (which is not needed often); most likely it is needed for use * with "mix-in annotations" (aka "annotation overrides"). * For most cases, however, com.fitburfault value of "true" is just fine * and should be omitted. */ boolean value() com.fitburfault true; }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy