diff --git a/website/templates/features/GetterSetter.html b/website/templates/features/GetterSetter.html
index 04cd1ec7..a429c9ac 100644
--- a/website/templates/features/GetterSetter.html
+++ b/website/templates/features/GetterSetter.html
@@ -45,6 +45,10 @@
lombok.getter.flagUsage = [warning | error] (default: not set)
@Getter as a warning or error if configured.
+ lombok.copyableAnnotations = [A list of fully qualified types] (default: empty list)
+
You can use @NonNull on the parameter of a method or constructor to have lombok generate a null-check statement for you.
- Lombok has always treated any annotation named @NonNull on a field as a signal to generate a null-check if lombok generates an entire method or constructor for you, via for example @Data. Now, however, using lombok's own @lombok.NonNull on a parameter results in the insertion of just the null-check statement inside your own method or constructor.
+ Lombok has always treated various annotations generally named @NonNull on a field as a signal to generate a null-check if lombok generates an entire method or constructor for you, via for example @Data. Now, however, using lombok's own @lombok.NonNull on a parameter results in the insertion of just the null-check statement inside your own method or constructor.
The null-check looks like if (param == null) throw new NullPointerException("param is marked @NonNull but is null"); and will be inserted at the very top of your method. For constructors, the null-check will be inserted immediately following any explicit this() or super() calls.
@@ -35,7 +35,7 @@
Lombok's detection scheme for already existing null-checks consists of scanning for if statements that look just like lombok's own. Any 'throws' statement as the 'then' part of the if statement, whether in braces or not, counts. The conditional of the if statement must look exactly like PARAMNAME == null. The first statement in your method that is not such a null-check stops the process of inspecting for null-checks.
- While @Data and other method-generating lombok annotations will trigger on any annotation named @NonNull regardless of casing or package name, this feature only triggers on lombok's own @NonNull annotation from the lombok package.
+ While @Data and other method-generating lombok annotations will trigger on various well-known annotations that signify the field must never be @NonNull, this feature only triggers on lombok's own @NonNull annotation from the lombok package.
A @NonNull on a primitive parameter results in a warning. No null-check will be generated.
diff --git a/website/templates/features/constructor.html b/website/templates/features/constructor.html
index b1f25321..02380319 100644
--- a/website/templates/features/constructor.html
+++ b/website/templates/features/constructor.html
@@ -38,6 +38,10 @@
lombok.anyConstructor.flagUsage = [warning | error] (default: not set)
lombok.copyableAnnotations = [A list of fully qualified types] (default: empty list)
+
- Starting with lombok v1.18.5, lombok will silently skip generating anything that already exists. You can define the inner Fields enum/class yourself,
+ Starting with lombok v1.18.6, lombok will silently skip generating anything that already exists. You can define the inner Fields enum/class yourself,
in which case lombok will add all the enum constants / public static final fields you haven't written yourself.
From lombok v1.16.22 to lombok v1.18.2, this feature generated constants inside the type directly; the name of these fields would for example turn field exampleFieldName into public static final String FIELD_EXAMPLE_FIELD_NAME = "exampleFieldName";. The prefix and suffix (here, FIELD_, and the empty string) were configurable. Starting with lombok v1.18.4 this feature has been redesigned into generating an inner type as described above.
diff --git a/website/usageExamples/experimental/FieldNameConstantsExample_post.jpage b/website/usageExamples/experimental/FieldNameConstantsExample_post.jpage
index 3a311746..e1366734 100644
--- a/website/usageExamples/experimental/FieldNameConstantsExample_post.jpage
+++ b/website/usageExamples/experimental/FieldNameConstantsExample_post.jpage
@@ -1,9 +1,10 @@
public class FieldNameConstantsExample {
private final String iAmAField;
private final int andSoAmI;
+ private final int asAmI;
public static final class Fields {
- public static final String iAmAField = "IAmAField";
- static final String andSoAmI = "andSoAmI";
+ public static final String iAmAField = "iAmAField";
+ public static final String andSoAmI = "andSoAmI";
}
}
diff --git a/website/usageExamples/experimental/FieldNameConstantsExample_pre.jpage b/website/usageExamples/experimental/FieldNameConstantsExample_pre.jpage
index dc6376eb..b462867b 100644
--- a/website/usageExamples/experimental/FieldNameConstantsExample_pre.jpage
+++ b/website/usageExamples/experimental/FieldNameConstantsExample_pre.jpage
@@ -4,6 +4,6 @@ import lombok.AccessLevel;
@FieldNameConstants
public class FieldNameConstantsExample {
private final String iAmAField;
- @FieldNameConstants(level = AccessLevel.PACKAGE)
private final int andSoAmI;
+ @FieldNameConstants.Exclude private final int asAmI;
}