aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/before
diff options
context:
space:
mode:
authorReinier Zwitserloot <r.zwitserloot@projectlombok.org>2022-02-08 06:02:05 +0100
committerReinier Zwitserloot <r.zwitserloot@projectlombok.org>2022-02-08 06:02:05 +0100
commit261758b4448b3d48ff2f48926ffcb8ea66121603 (patch)
tree1996f090ab62b3626fe875406a294e724ad94a12 /test/transform/resource/before
parent8a914b1bf0eaa13178e719431add47b78d4e7277 (diff)
downloadlombok-261758b4448b3d48ff2f48926ffcb8ea66121603.tar.gz
lombok-261758b4448b3d48ff2f48926ffcb8ea66121603.tar.bz2
lombok-261758b4448b3d48ff2f48926ffcb8ea66121603.zip
[implements #1456] accessors can now be made final via `@Accessors`.
Diffstat (limited to 'test/transform/resource/before')
-rw-r--r--test/transform/resource/before/Accessors.java2
-rw-r--r--test/transform/resource/before/AccessorsCascade.java23
-rw-r--r--test/transform/resource/before/AccessorsMakeFinal.java5
-rw-r--r--test/transform/resource/before/AccessorsMakeFinalLombokConfig.java6
-rw-r--r--test/transform/resource/before/AccessorsNoParamWarning.java9
5 files changed, 44 insertions, 1 deletions
diff --git a/test/transform/resource/before/Accessors.java b/test/transform/resource/before/Accessors.java
index 3ef8a02f..54430cd6 100644
--- a/test/transform/resource/before/Accessors.java
+++ b/test/transform/resource/before/Accessors.java
@@ -7,7 +7,7 @@ class AccessorsFluent {
@lombok.Getter
class AccessorsFluentOnClass {
@lombok.Setter private String fieldName = "";
- @lombok.experimental.Accessors private String otherFieldWithOverride = "";
+ @lombok.experimental.Accessors(fluent=false) private String otherFieldWithOverride = "";
}
class AccessorsChain {
diff --git a/test/transform/resource/before/AccessorsCascade.java b/test/transform/resource/before/AccessorsCascade.java
new file mode 100644
index 00000000..8ad141f8
--- /dev/null
+++ b/test/transform/resource/before/AccessorsCascade.java
@@ -0,0 +1,23 @@
+//CONF: lombok.Accessors.prefix += f
+
+@lombok.experimental.Accessors(chain=true)
+class AccessorsOuter {
+ @lombok.Setter
+ private String fTest;
+
+ @lombok.experimental.Accessors(prefix="z")
+ @lombok.Setter
+ private String zTest2;
+
+ class AccessorsInner1 {
+ @lombok.experimental.Accessors(prefix="z")
+ @lombok.Setter
+ private String zTest3;
+ }
+
+ @lombok.experimental.Accessors(chain=false)
+ class AccessorsInner2 {
+ @lombok.Setter
+ private String fTest4;
+ }
+}
diff --git a/test/transform/resource/before/AccessorsMakeFinal.java b/test/transform/resource/before/AccessorsMakeFinal.java
new file mode 100644
index 00000000..5c45873a
--- /dev/null
+++ b/test/transform/resource/before/AccessorsMakeFinal.java
@@ -0,0 +1,5 @@
+@lombok.experimental.Accessors(makeFinal = true)
+class AccessorsMakeFinal1 {
+ @lombok.Setter @lombok.experimental.Accessors(fluent = true)
+ private String test;
+}
diff --git a/test/transform/resource/before/AccessorsMakeFinalLombokConfig.java b/test/transform/resource/before/AccessorsMakeFinalLombokConfig.java
new file mode 100644
index 00000000..8e948520
--- /dev/null
+++ b/test/transform/resource/before/AccessorsMakeFinalLombokConfig.java
@@ -0,0 +1,6 @@
+//CONF: lombok.Accessors.makeFinal = true
+
+class AccessorsMakeFinalLombokConfig {
+ @lombok.Setter
+ private String test;
+}
diff --git a/test/transform/resource/before/AccessorsNoParamWarning.java b/test/transform/resource/before/AccessorsNoParamWarning.java
new file mode 100644
index 00000000..572b2178
--- /dev/null
+++ b/test/transform/resource/before/AccessorsNoParamWarning.java
@@ -0,0 +1,9 @@
+@lombok.experimental.Accessors(fluent=true)
+class AccessorsNoParams {
+ @lombok.Getter @lombok.experimental.Accessors private String otherFieldWithOverride = "";
+}
+
+@lombok.experimental.Accessors
+class AccessorsNoParams2 {
+ @lombok.Setter private boolean foo;
+}