aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/javac/handlers/HandleBuilder.java
diff options
context:
space:
mode:
authorWerner Dietl <wdietl@gmail.com>2018-08-27 18:36:13 -0400
committerReinier Zwitserloot <reinier@zwitserloot.com>2018-09-11 01:59:19 +0200
commit79bfcc4f7ae4bcd61f7f942bfefb940c77927b71 (patch)
tree382b77e1806bd3513dc8f49b009e1aa23cc4dd2d /src/core/lombok/javac/handlers/HandleBuilder.java
parent7a575e1e5d1c78fa5be1deca7fc308bd9eb390dd (diff)
downloadlombok-79bfcc4f7ae4bcd61f7f942bfefb940c77927b71.tar.gz
lombok-79bfcc4f7ae4bcd61f7f942bfefb940c77927b71.tar.bz2
lombok-79bfcc4f7ae4bcd61f7f942bfefb940c77927b71.zip
Add configuration key, handle whereever NULLABLE is handled, support Eclipse.
Diffstat (limited to 'src/core/lombok/javac/handlers/HandleBuilder.java')
-rw-r--r--src/core/lombok/javac/handlers/HandleBuilder.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/lombok/javac/handlers/HandleBuilder.java b/src/core/lombok/javac/handlers/HandleBuilder.java
index 335dee1a..75bfb01c 100644
--- a/src/core/lombok/javac/handlers/HandleBuilder.java
+++ b/src/core/lombok/javac/handlers/HandleBuilder.java
@@ -149,10 +149,15 @@ public class HandleBuilder extends JavacAnnotationHandler<Builder> {
JCVariableDecl fd = (JCVariableDecl) fieldNode.get();
JavacNode isDefault = findAnnotation(Builder.Default.class, fieldNode, false);
boolean isFinal = (fd.mods.flags & Flags.FINAL) != 0 || (valuePresent && !hasAnnotation(NonFinal.class, fieldNode));
+
+ List<JCAnnotation> nonNulls = findAnnotations(fieldNode, NON_NULL_PATTERN);
+ List<JCAnnotation> nullables = findAnnotations(fieldNode, NULLABLE_PATTERN);
+ List<JCAnnotation> copyAnnotations = findExactAnnotations(fieldNode, copyAnnotationNames(fieldNode.getAst()));
+
BuilderFieldData bfd = new BuilderFieldData();
bfd.rawName = fd.name;
bfd.name = removePrefixFromField(fieldNode);
- bfd.annotations = fd.mods.annotations;
+ bfd.annotations = nonNulls.appendList(nullables).appendList(copyAnnotations);
bfd.type = fd.vartype;
bfd.singularData = getSingularData(fieldNode);
bfd.originalFieldNode = fieldNode;