mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-13 14:16:11 +00:00
[fixes #2046] you can now suppress the builder() method, useful if you only want toBuilder(). Also suppresses the warnings about any missing Builder.Default annotations.
This commit is contained in:
1 parent
535e20972c
commit
228e99fe52
8 files changed
+118
-7
No files matched your search
@@ -0,0 +1,27 @@
|
||||
import lombok.Builder;
|
||||
@Builder(toBuilder = true,builderMethodName = "") class BuilderWithNoBuilderMethod {
|
||||
public static @java.lang.SuppressWarnings("all") class BuilderWithNoBuilderMethodBuilder {
|
||||
private @java.lang.SuppressWarnings("all") String a;
|
||||
@java.lang.SuppressWarnings("all") BuilderWithNoBuilderMethodBuilder() {
|
||||
super();
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") BuilderWithNoBuilderMethodBuilder a(final String a) {
|
||||
this.a = a;
|
||||
return this;
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") BuilderWithNoBuilderMethod build() {
|
||||
return new BuilderWithNoBuilderMethod(a);
|
||||
}
|
||||
public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() {
|
||||
return (("BuilderWithNoBuilderMethod.BuilderWithNoBuilderMethodBuilder(a=" + this.a) + ")");
|
||||
}
|
||||
}
|
||||
private String a = "";
|
||||
@java.lang.SuppressWarnings("all") BuilderWithNoBuilderMethod(final String a) {
|
||||
super();
|
||||
this.a = a;
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") BuilderWithNoBuilderMethodBuilder toBuilder() {
|
||||
return new BuilderWithNoBuilderMethodBuilder().a(this.a);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user