mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-12 20:15:55 +00:00
[builder] big refactor: Fixing CheckerFramework features + all params now in an object
These handlers had methods with humongous argument lists, and they needed to grow even more in order to accommodate some new needs to properly implement checkerframework (where annos can be type-use based, which means they were being put in the wrong place. void foo(com.foo.@X Bar paramName) // correct void foo(@X com.foo.Bar paramName) // wrong For example, the CalledMethod annotation is a type-use annotation. This commit covers both that refactor and fixing checkerframework generation.
This commit is contained in:
27 files changed
+1161
-997
No files matched your search
@@ -1,7 +1,8 @@
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
import lombok.With;
|
||||
@Data @Accessors(chain = true) class CheckerFrameworkBasic {
|
||||
@Data @AllArgsConstructor @Accessors(chain = true) class CheckerFrameworkBasic {
|
||||
private final @With int x;
|
||||
private final int y;
|
||||
private int z;
|
||||
@@ -17,7 +18,7 @@ import lombok.With;
|
||||
public @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") int getZ() {
|
||||
return this.z;
|
||||
}
|
||||
public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") CheckerFrameworkBasic setZ(final int z) {
|
||||
public @org.checkerframework.common.returnsreceiver.qual.This @java.lang.SuppressWarnings("all") CheckerFrameworkBasic setZ(final int z) {
|
||||
this.z = z;
|
||||
return this;
|
||||
}
|
||||
@@ -51,9 +52,10 @@ import lombok.With;
|
||||
public @java.lang.Override @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") java.lang.String toString() {
|
||||
return (((((("CheckerFrameworkBasic(x=" + this.getX()) + ", y=") + this.getY()) + ", z=") + this.getZ()) + ")");
|
||||
}
|
||||
public @org.checkerframework.common.aliasing.qual.Unique @java.lang.SuppressWarnings("all") CheckerFrameworkBasic(final int x, final int y) {
|
||||
public @java.lang.SuppressWarnings("all") CheckerFrameworkBasic(final int x, final int y, final int z) {
|
||||
super();
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user