diff options
| author | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2022-02-08 06:02:05 +0100 |
|---|---|---|
| committer | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2022-02-08 06:02:05 +0100 |
| commit | 261758b4448b3d48ff2f48926ffcb8ea66121603 (patch) | |
| tree | 1996f090ab62b3626fe875406a294e724ad94a12 /test/transform/resource/after-delombok | |
| parent | 8a914b1bf0eaa13178e719431add47b78d4e7277 (diff) | |
| download | lombok-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/after-delombok')
4 files changed, 71 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/AccessorsCascade.java b/test/transform/resource/after-delombok/AccessorsCascade.java new file mode 100644 index 00000000..ba4d13d4 --- /dev/null +++ b/test/transform/resource/after-delombok/AccessorsCascade.java @@ -0,0 +1,39 @@ +//CONF: lombok.Accessors.prefix += f +class AccessorsOuter { + private String fTest; + private String zTest2; + class AccessorsInner1 { + private String zTest3; + /** + * @return {@code this}. + */ + @java.lang.SuppressWarnings("all") + public AccessorsOuter.AccessorsInner1 setTest3(final String zTest3) { + this.zTest3 = zTest3; + return this; + } + } + class AccessorsInner2 { + private String fTest4; + @java.lang.SuppressWarnings("all") + public void setTest4(final String fTest4) { + this.fTest4 = fTest4; + } + } + /** + * @return {@code this}. + */ + @java.lang.SuppressWarnings("all") + public AccessorsOuter setTest(final String fTest) { + this.fTest = fTest; + return this; + } + /** + * @return {@code this}. + */ + @java.lang.SuppressWarnings("all") + public AccessorsOuter setTest2(final String zTest2) { + this.zTest2 = zTest2; + return this; + } +}
\ No newline at end of file diff --git a/test/transform/resource/after-delombok/AccessorsMakeFinal.java b/test/transform/resource/after-delombok/AccessorsMakeFinal.java new file mode 100644 index 00000000..d88e8616 --- /dev/null +++ b/test/transform/resource/after-delombok/AccessorsMakeFinal.java @@ -0,0 +1,11 @@ +class AccessorsMakeFinal1 { + private String test; + /** + * @return {@code this}. + */ + @java.lang.SuppressWarnings("all") + public final AccessorsMakeFinal1 test(final String test) { + this.test = test; + return this; + } +}
\ No newline at end of file diff --git a/test/transform/resource/after-delombok/AccessorsMakeFinalLombokConfig.java b/test/transform/resource/after-delombok/AccessorsMakeFinalLombokConfig.java new file mode 100644 index 00000000..61deedee --- /dev/null +++ b/test/transform/resource/after-delombok/AccessorsMakeFinalLombokConfig.java @@ -0,0 +1,7 @@ +class AccessorsMakeFinalLombokConfig { + private String test; + @java.lang.SuppressWarnings("all") + public final void setTest(final String test) { + this.test = test; + } +}
\ No newline at end of file diff --git a/test/transform/resource/after-delombok/AccessorsNoParamWarning.java b/test/transform/resource/after-delombok/AccessorsNoParamWarning.java new file mode 100644 index 00000000..3e9c4c5f --- /dev/null +++ b/test/transform/resource/after-delombok/AccessorsNoParamWarning.java @@ -0,0 +1,14 @@ +class AccessorsNoParams { + private String otherFieldWithOverride = ""; + @java.lang.SuppressWarnings("all") + public String otherFieldWithOverride() { + return this.otherFieldWithOverride; + } +} +class AccessorsNoParams2 { + private boolean foo; + @java.lang.SuppressWarnings("all") + public void setFoo(final boolean foo) { + this.foo = foo; + } +}
\ No newline at end of file |
