mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-20 00:15:29 +00:00
[fixes #2335] ObtainVia(method=) on more than one arg would crash in javac
This commit is contained in:
7 files changed
+207
-34
No files matched your search
@@ -0,0 +1,51 @@
|
||||
import lombok.Builder;
|
||||
public @Builder class I2335_BuilderMultipleObtainVia {
|
||||
public static @java.lang.SuppressWarnings("all") class I2335_BuilderMultipleObtainViaBuilder {
|
||||
private @java.lang.SuppressWarnings("all") String theString;
|
||||
private @java.lang.SuppressWarnings("all") Long theLong;
|
||||
@java.lang.SuppressWarnings("all") I2335_BuilderMultipleObtainViaBuilder() {
|
||||
super();
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") I2335_BuilderMultipleObtainVia.I2335_BuilderMultipleObtainViaBuilder theString(final String theString) {
|
||||
this.theString = theString;
|
||||
return this;
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") I2335_BuilderMultipleObtainVia.I2335_BuilderMultipleObtainViaBuilder theLong(final Long theLong) {
|
||||
this.theLong = theLong;
|
||||
return this;
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") I2335_BuilderMultipleObtainVia build() {
|
||||
return new I2335_BuilderMultipleObtainVia(this.theString, this.theLong);
|
||||
}
|
||||
public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() {
|
||||
return (((("I2335_BuilderMultipleObtainVia.I2335_BuilderMultipleObtainViaBuilder(theString=" + this.theString) + ", theLong=") + this.theLong) + ")");
|
||||
}
|
||||
}
|
||||
private String theString;
|
||||
private Long theLong;
|
||||
public @Builder(toBuilder = true) I2335_BuilderMultipleObtainVia(@Builder.ObtainVia(method = "getTheString") String theString, @Builder.ObtainVia(method = "getTheLong") Long theLong) {
|
||||
super();
|
||||
setTheString(theString);
|
||||
setTheLong(theLong);
|
||||
}
|
||||
public String getTheString() {
|
||||
return theString;
|
||||
}
|
||||
public Long getTheLong() {
|
||||
return theLong;
|
||||
}
|
||||
public void setTheString(String theString) {
|
||||
this.theString = theString;
|
||||
}
|
||||
public void setTheLong(Long theLong) {
|
||||
this.theLong = theLong;
|
||||
}
|
||||
public static @java.lang.SuppressWarnings("all") I2335_BuilderMultipleObtainVia.I2335_BuilderMultipleObtainViaBuilder builder() {
|
||||
return new I2335_BuilderMultipleObtainVia.I2335_BuilderMultipleObtainViaBuilder();
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") I2335_BuilderMultipleObtainVia.I2335_BuilderMultipleObtainViaBuilder toBuilder() {
|
||||
String theString = this.getTheString();
|
||||
Long theLong = this.getTheLong();
|
||||
return new I2335_BuilderMultipleObtainVia.I2335_BuilderMultipleObtainViaBuilder().theString(theString).theLong(theLong);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user