diff options
Diffstat (limited to 'test/transform/resource/after-ecj')
3 files changed, 31 insertions, 2 deletions
diff --git a/test/transform/resource/after-ecj/WithByOnRecord.java b/test/transform/resource/after-ecj/WithByOnRecord.java index 9048c9f4..c40841c8 100644 --- a/test/transform/resource/after-ecj/WithByOnRecord.java +++ b/test/transform/resource/after-ecj/WithByOnRecord.java @@ -1,8 +1,8 @@ import lombok.experimental.WithBy; -record WithByOnRecord(String a, String b) { +@WithBy record WithByOnRecord(String a, String b) { /* Implicit */ private final String a; /* Implicit */ private final String b; - public WithByOnRecord( String a, String b) { + public WithByOnRecord(String a, String b) { super(); .a = a; .b = b; @@ -10,4 +10,7 @@ record WithByOnRecord(String a, String b) { public @java.lang.SuppressWarnings("all") WithByOnRecord withABy(final java.util.function.Function<? super String, ? extends String> transformer) { return new WithByOnRecord(transformer.apply(this.a), this.b); } + public @java.lang.SuppressWarnings("all") WithByOnRecord withBBy(final java.util.function.Function<? super String, ? extends String> transformer) { + return new WithByOnRecord(this.a, transformer.apply(this.b)); + } } diff --git a/test/transform/resource/after-ecj/WithByOnRecordComponent.java b/test/transform/resource/after-ecj/WithByOnRecordComponent.java new file mode 100644 index 00000000..19fe508c --- /dev/null +++ b/test/transform/resource/after-ecj/WithByOnRecordComponent.java @@ -0,0 +1,13 @@ +import lombok.experimental.WithBy; +record WithByOnRecordComponent(String a, String b) { +/* Implicit */ private final String a; +/* Implicit */ private final String b; + public WithByOnRecordComponent( String a, String b) { + super(); + .a = a; + .b = b; + } + public @java.lang.SuppressWarnings("all") WithByOnRecordComponent withABy(final java.util.function.Function<? super String, ? extends String> transformer) { + return new WithByOnRecordComponent(transformer.apply(this.a), this.b); + } +} diff --git a/test/transform/resource/after-ecj/WithOnRecordComponent.java b/test/transform/resource/after-ecj/WithOnRecordComponent.java new file mode 100644 index 00000000..42028f81 --- /dev/null +++ b/test/transform/resource/after-ecj/WithOnRecordComponent.java @@ -0,0 +1,13 @@ +import lombok.With; +record WithOnRecordComponent(String a, String b) { +/* Implicit */ private final String a; +/* Implicit */ private final String b; + public WithOnRecordComponent( String a, String b) { + super(); + .a = a; + .b = b; + } + public @java.lang.SuppressWarnings("all") WithOnRecordComponent withA(final String a) { + return ((this.a == a) ? this : new WithOnRecordComponent(a, this.b)); + } +} |