mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-13 16:15:16 +00:00
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:
1 parent
0064c53427
commit
fa0b5249cf
13 files changed
+67
-35
No files matched your search
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user