diff --git a/src/core/lombok/extern/jackson/Jacksonized.java b/src/core/lombok/extern/jackson/Jacksonized.java
index 801ddbcb..bba654c3 100644
--- a/src/core/lombok/extern/jackson/Jacksonized.java
+++ b/src/core/lombok/extern/jackson/Jacksonized.java
@@ -27,13 +27,23 @@ import static java.lang.annotation.RetentionPolicy.*;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
import lombok.Builder;
+import lombok.experimental.Accessors;
import lombok.experimental.SuperBuilder;
/**
* The {@code @Jacksonized} annotation is an add-on annotation for
- * {@code @}{@link Builder} and {@code @}{@link SuperBuilder}. It automatically
- * configures the generated builder class to be used by Jackson's
+ * {@code @}{@link Builder}, {@code @}{@link SuperBuilder}, and
+ * {@code @}{@link Accessors}.
+ *
+ * For {@code @}{@link Accessors}{@code (fluent = true)}, it automatically
+ * configures Jackson to use the generated setters and getters for
+ * (de-)serialization by inserting {@code @}{@link JsonProperty} annotations.
+ *
+ * For {@code @}{@link Builder} and {@code @}{@link SuperBuilder}, it
+ * automatically configures the generated builder class to be used by Jackson's
* deserialization. It only has an effect if present at a context where there is
* also a {@code @Builder} or a {@code @SuperBuilder}; a warning is emitted
* otherwise.
@@ -41,8 +51,8 @@ import lombok.experimental.SuperBuilder;
* In particular, the annotation does the following:
*
* - Configure Jackson to use the builder for deserialization using
- * {@code @JsonDeserialize(builder=Foobar.FoobarBuilder[Impl].class)}
- * on the class (where Foobar is the name of the annotated class).
+ * {@code @JsonDeserialize(builder=Foobar.FoobarBuilder[Impl].class)} on the
+ * class (where Foobar is the name of the annotated class).
* - Copy Jackson-related configuration annotations (like
* {@code @JsonIgnoreProperties}) from the class to the builder class. This is
* necessary so that Jackson recognizes them when using the builder.
@@ -54,9 +64,9 @@ import lombok.experimental.SuperBuilder;
* - For {@code @SuperBuilder}, make the builder implementation class
* package-private.
*
- * This annotation does not change the behavior of the generated builder.
- * A {@code @Jacksonized} {@code @SuperBuilder} remains fully compatible to
- * regular {@code @SuperBuilder}s.
+ * This annotation does not change the behavior of the generated
+ * builder. A {@code @Jacksonized} {@code @SuperBuilder} remains fully
+ * compatible to regular {@code @SuperBuilder}s.
*/
@Target({TYPE, METHOD, CONSTRUCTOR})
@Retention(SOURCE)
diff --git a/src/core/lombok/javac/handlers/HandleJacksonized.java b/src/core/lombok/javac/handlers/HandleJacksonized.java
index 3ee0eec4..7b1cb63f 100644
--- a/src/core/lombok/javac/handlers/HandleJacksonized.java
+++ b/src/core/lombok/javac/handlers/HandleJacksonized.java
@@ -42,6 +42,7 @@ import lombok.core.AST.Kind;
import lombok.core.AnnotationValues;
import lombok.core.HandlerPriority;
import lombok.core.handlers.HandlerUtil;
+import lombok.experimental.Accessors;
import lombok.experimental.SuperBuilder;
import lombok.extern.jackson.Jacksonized;
import lombok.javac.JavacAnnotationHandler;
@@ -73,8 +74,9 @@ public class HandleJacksonized extends JavacAnnotationHandler {
JavacNode builderAnnotationNode = findAnnotation(Builder.class, annotatedNode);
JavacNode superBuilderAnnotationNode = findAnnotation(SuperBuilder.class, annotatedNode);
- if (builderAnnotationNode == null && superBuilderAnnotationNode == null) {
- annotationNode.addWarning("@Jacksonized requires @Builder or @SuperBuilder for it to mean anything.");
+ JavacNode accessorsAnnotationNode = findAnnotation(Accessors.class, annotatedNode);
+ if (builderAnnotationNode == null && superBuilderAnnotationNode == null && accessorsAnnotationNode == null) {
+ annotationNode.addWarning("@Jacksonized requires @Builder, @SuperBuilder, or @Accessors for it to mean anything.");
return;
}