Support With(By) on records and record components

This also replaces the javac/eclipse specific code for searching the
parent fields of an annotation by a search based on the lombok AST.
This commit is contained in:
Rawi01 committed 2020-09-12 14:35:40 +02:00
1 parent 0064c53427
commit fa0b5249cf
13 files changed
+67 -35

No files matched your search

@@ -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));
}
}