[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:
Reinier Zwitserloot committed 2020-10-03 23:55:10 +02:00
1 parent 07e921d2b1
commit 14cce76805
27 files changed
+1161 -997

No files matched your search

@@ -2,12 +2,6 @@ class CheckerFrameworkBasic {
private final int x;
private final int y;
private int z;
@org.checkerframework.common.aliasing.qual.Unique
@java.lang.SuppressWarnings("all")
public CheckerFrameworkBasic(final int x, final int y) {
this.x = x;
this.y = y;
}
@org.checkerframework.dataflow.qual.Pure
@java.lang.SuppressWarnings("all")
public int getX() {
@@ -23,7 +17,7 @@ class CheckerFrameworkBasic {
public int getZ() {
return this.z;
}
@org.checkerframework.checker.builder.qual.ReturnsReceiver
@org.checkerframework.common.returnsreceiver.qual.This
@java.lang.SuppressWarnings("all")
public CheckerFrameworkBasic setZ(final int z) {
this.z = z;
@@ -64,6 +58,12 @@ class CheckerFrameworkBasic {
public java.lang.String toString() {
return "CheckerFrameworkBasic(x=" + this.getX() + ", y=" + this.getY() + ", z=" + this.getZ() + ")";
}
@java.lang.SuppressWarnings("all")
public CheckerFrameworkBasic(final int x, final int y, final int z) {
this.x = x;
this.y = y;
this.z = z;
}
@org.checkerframework.dataflow.qual.SideEffectFree
@java.lang.SuppressWarnings("all")
public CheckerFrameworkBasic withX(final int x) {