mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-19 02:14:30 +00:00
Merge branch 'master' of github.com:rzwitserloot/lombok into feature/builder-setter-prefixes
This commit is contained in:
commit
dc56309dad
170 files changed
+2682
-1214
No files matched your search
@@ -47,6 +47,7 @@ import lombok.core.configuration.ConfigurationKeysLoader;
|
||||
import lombok.core.configuration.ConfigurationResolver;
|
||||
import lombok.core.configuration.ConfigurationResolverFactory;
|
||||
import lombok.javac.CapturingDiagnosticListener.CompilerMessage;
|
||||
import lombok.transform.TestLombokFilesIdempotent;
|
||||
|
||||
public abstract class AbstractRunTests {
|
||||
private final File dumpActualFilesHere;
|
||||
@@ -74,6 +75,7 @@ public abstract class AbstractRunTests {
|
||||
if (expected.isIgnore()) return null;
|
||||
if (!expected.versionWithinLimit(params.getVersion())) return null;
|
||||
if (!expected.versionWithinLimit(version)) return null;
|
||||
if (expected.isSkipIdempotent() && params instanceof TestLombokFilesIdempotent) return null;
|
||||
|
||||
final LombokTestSource sourceDirectives_ = sourceDirectives;
|
||||
final AssertionError directiveFailure_ = directiveFailure;
|
||||
|
||||
@@ -88,7 +88,7 @@ public class CompilerMessageMatcher {
|
||||
return out;
|
||||
}
|
||||
|
||||
private static final Pattern PATTERN = Pattern.compile("^(\\d+) (.*)$");
|
||||
private static final Pattern PATTERN = Pattern.compile("^(-?\\d+) (.*)$");
|
||||
|
||||
private static CompilerMessageMatcher read(String line) {
|
||||
line = line.trim();
|
||||
|
||||
@@ -36,7 +36,8 @@ import org.junit.runner.notification.Failure;
|
||||
import org.junit.runner.notification.RunNotifier;
|
||||
|
||||
public class DirectoryRunner extends Runner {
|
||||
private static final String DEBUG_FOCUS_ON_FILE = null;
|
||||
/** Fill in a file name (or multiple, space separated) to reduce the testset to just the named file(s). */
|
||||
private static final String DEBUG_FOCUS_ON_FILE = "";
|
||||
|
||||
public enum Compiler {
|
||||
DELOMBOK {
|
||||
@@ -79,7 +80,7 @@ public class DirectoryRunner extends Runner {
|
||||
private static final FileFilter JAVA_FILE_FILTER = new FileFilter() {
|
||||
@Override public boolean accept(File file) {
|
||||
return file.isFile() && file.getName().endsWith(".java") &&
|
||||
(DEBUG_FOCUS_ON_FILE == null || file.getName().equals(DEBUG_FOCUS_ON_FILE));
|
||||
(DEBUG_FOCUS_ON_FILE.isEmpty() || (" " + DEBUG_FOCUS_ON_FILE + " ").contains(" " + file.getName() + " "));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2014-2015 The Project Lombok Authors.
|
||||
* Copyright (C) 2014-2019 The Project Lombok Authors.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -52,6 +52,7 @@ public class LombokTestSource {
|
||||
private final Map<String, String> formatPreferences;
|
||||
private final boolean ignore;
|
||||
private final boolean skipCompareContent;
|
||||
private final boolean skipIdempotent;
|
||||
private final boolean unchanged;
|
||||
private final int versionLowerLimit, versionUpperLimit;
|
||||
private final ConfigurationResolver configuration;
|
||||
@@ -92,6 +93,10 @@ public class LombokTestSource {
|
||||
return skipCompareContent;
|
||||
}
|
||||
|
||||
public boolean isSkipIdempotent() {
|
||||
return skipIdempotent;
|
||||
}
|
||||
|
||||
public String getSpecifiedEncoding() {
|
||||
return specifiedEncoding;
|
||||
}
|
||||
@@ -139,6 +144,7 @@ public class LombokTestSource {
|
||||
private static final Pattern IGNORE_PATTERN = Pattern.compile("^\\s*ignore\\s*(?:[-:].*)?$", Pattern.CASE_INSENSITIVE);
|
||||
private static final Pattern UNCHANGED_PATTERN = Pattern.compile("^\\s*unchanged\\s*(?:[-:].*)?$", Pattern.CASE_INSENSITIVE);
|
||||
private static final Pattern SKIP_COMPARE_CONTENT_PATTERN = Pattern.compile("^\\s*skip[- ]?compare[- ]?contents?\\s*(?:[-:].*)?$", Pattern.CASE_INSENSITIVE);
|
||||
private static final Pattern SKIP_IDEMPOTENT_PATTERN = Pattern.compile("^\\s*skip[- ]?idempotent\\s*(?:[-:].*)?$", Pattern.CASE_INSENSITIVE);
|
||||
|
||||
private LombokTestSource(File file, String content, List<CompilerMessageMatcher> messages, List<String> directives) {
|
||||
this.file = file;
|
||||
@@ -150,6 +156,7 @@ public class LombokTestSource {
|
||||
int versionUpper = Integer.MAX_VALUE;
|
||||
boolean ignore = false;
|
||||
boolean skipCompareContent = false;
|
||||
boolean skipIdempotent = false;
|
||||
boolean unchanged = false;
|
||||
String encoding = null;
|
||||
Map<String, String> formats = new HashMap<String, String>();
|
||||
@@ -173,6 +180,11 @@ public class LombokTestSource {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (SKIP_IDEMPOTENT_PATTERN.matcher(directive).matches()) {
|
||||
skipIdempotent = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (lc.startsWith("platform ")) {
|
||||
String platformDesc = lc.substring("platform ".length());
|
||||
int idx = platformDesc.indexOf(':');
|
||||
@@ -223,6 +235,7 @@ public class LombokTestSource {
|
||||
this.versionUpperLimit = versionUpper;
|
||||
this.ignore = ignore;
|
||||
this.skipCompareContent = skipCompareContent;
|
||||
this.skipIdempotent = skipIdempotent;
|
||||
this.unchanged = unchanged;
|
||||
this.platforms = platformLimit == null ? null : Arrays.asList(platformLimit);
|
||||
ConfigurationProblemReporter reporter = new ConfigurationProblemReporter() {
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
PullRequest https://github.com/rzwitserloot/lombok/pull/2114 tries to fix issue https://github.com/rzwitserloot/lombok/issues/1976 but causes problems.
|
||||
|
||||
The problem is that the fail-fast resolver applied by PR 2114 causes the following issue:
|
||||
|
||||
Given:
|
||||
|
||||
A.java:
|
||||
|
||||
public class A {
|
||||
interface Inner {
|
||||
default void example() {
|
||||
lombok.val v = doesNotExist();
|
||||
}
|
||||
}
|
||||
B b = new B();
|
||||
}
|
||||
|
||||
B.java:
|
||||
|
||||
import com.foo.pkg.A.Inner;
|
||||
|
||||
public class B implements Inner {
|
||||
void foo() {
|
||||
lombok.val v = doesNotExist();
|
||||
}
|
||||
}
|
||||
|
||||
will cause A.java to be parsed such that nothing in it exists, in turn causing B to consider A.Inner to not exist at all,
|
||||
even though the error on the 'implements Inner' line offers 'import Inner' as a quickfix. This quickfix won't, obviously, fix it.
|
||||
|
||||
In addition, enough 'A refers to B refers to A' loops with errors like this and eclipse 2019-06 will eventually run out of heap and crash.
|
||||
|
||||
The key commit that attempts to fix 1976 but causes the above issue is commit 089f2ec5f45567c8c12e9d13bf9be8fa5c107c18.
|
||||
|
||||
The commit that undoes this, re-introducing 1976 but avoiding the problem above, is commit 877a169727a4c8078c43a4465929247c3390c897.
|
||||
@@ -0,0 +1,72 @@
|
||||
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.SideEffectFree
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public int getX() {
|
||||
return this.x;
|
||||
}
|
||||
@org.checkerframework.dataflow.qual.SideEffectFree
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public int getY() {
|
||||
return this.y;
|
||||
}
|
||||
@org.checkerframework.dataflow.qual.SideEffectFree
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public int getZ() {
|
||||
return this.z;
|
||||
}
|
||||
@org.checkerframework.checker.builder.qual.ReturnsReceiver
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public CheckerFrameworkBasic setZ(final int z) {
|
||||
this.z = z;
|
||||
return this;
|
||||
}
|
||||
@org.checkerframework.dataflow.qual.SideEffectFree
|
||||
@java.lang.Override
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public boolean equals(final java.lang.Object o) {
|
||||
if (o == this) return true;
|
||||
if (!(o instanceof CheckerFrameworkBasic)) return false;
|
||||
final CheckerFrameworkBasic other = (CheckerFrameworkBasic) o;
|
||||
if (!other.canEqual((java.lang.Object) this)) return false;
|
||||
if (this.getX() != other.getX()) return false;
|
||||
if (this.getY() != other.getY()) return false;
|
||||
if (this.getZ() != other.getZ()) return false;
|
||||
return true;
|
||||
}
|
||||
@org.checkerframework.dataflow.qual.SideEffectFree
|
||||
@java.lang.SuppressWarnings("all")
|
||||
protected boolean canEqual(final java.lang.Object other) {
|
||||
return other instanceof CheckerFrameworkBasic;
|
||||
}
|
||||
@org.checkerframework.dataflow.qual.SideEffectFree
|
||||
@java.lang.Override
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public int hashCode() {
|
||||
final int PRIME = 59;
|
||||
int result = 1;
|
||||
result = result * PRIME + this.getX();
|
||||
result = result * PRIME + this.getY();
|
||||
result = result * PRIME + this.getZ();
|
||||
return result;
|
||||
}
|
||||
@org.checkerframework.dataflow.qual.SideEffectFree
|
||||
@java.lang.Override
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public java.lang.String toString() {
|
||||
return "CheckerFrameworkBasic(x=" + this.getX() + ", y=" + this.getY() + ", z=" + this.getZ() + ")";
|
||||
}
|
||||
@org.checkerframework.dataflow.qual.SideEffectFree
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public CheckerFrameworkBasic withX(final int x) {
|
||||
return this.x == x ? this : new CheckerFrameworkBasic(x, this.y, this.z);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
// skip-idempotent
|
||||
import java.util.List;
|
||||
class CheckerFrameworkBuilder {
|
||||
int x;
|
||||
int y;
|
||||
int z;
|
||||
List<String> names;
|
||||
@java.lang.SuppressWarnings("all")
|
||||
private static int $default$x() {
|
||||
return 5;
|
||||
}
|
||||
@org.checkerframework.common.aliasing.qual.Unique
|
||||
@java.lang.SuppressWarnings("all")
|
||||
CheckerFrameworkBuilder(final int x, final int y, final int z, final List<String> names) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
this.names = names;
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public static class CheckerFrameworkBuilderBuilder {
|
||||
@java.lang.SuppressWarnings("all")
|
||||
private boolean x$set;
|
||||
@java.lang.SuppressWarnings("all")
|
||||
private int x$value;
|
||||
@java.lang.SuppressWarnings("all")
|
||||
private int y;
|
||||
@java.lang.SuppressWarnings("all")
|
||||
private int z;
|
||||
@java.lang.SuppressWarnings("all")
|
||||
private java.util.ArrayList<String> names;
|
||||
@org.checkerframework.common.aliasing.qual.Unique
|
||||
@java.lang.SuppressWarnings("all")
|
||||
CheckerFrameworkBuilderBuilder() {
|
||||
}
|
||||
@org.checkerframework.checker.builder.qual.ReturnsReceiver
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public CheckerFrameworkBuilderBuilder x(@org.checkerframework.checker.builder.qual.NotCalledMethods("x") CheckerFrameworkBuilderBuilder this, final int x) {
|
||||
this.x$value = x;
|
||||
x$set = true;
|
||||
return this;
|
||||
}
|
||||
@org.checkerframework.checker.builder.qual.ReturnsReceiver
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public CheckerFrameworkBuilderBuilder y(@org.checkerframework.checker.builder.qual.NotCalledMethods("y") CheckerFrameworkBuilderBuilder this, final int y) {
|
||||
this.y = y;
|
||||
return this;
|
||||
}
|
||||
@org.checkerframework.checker.builder.qual.ReturnsReceiver
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public CheckerFrameworkBuilderBuilder z(@org.checkerframework.checker.builder.qual.NotCalledMethods("z") CheckerFrameworkBuilderBuilder this, final int z) {
|
||||
this.z = z;
|
||||
return this;
|
||||
}
|
||||
@org.checkerframework.checker.builder.qual.ReturnsReceiver
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public CheckerFrameworkBuilderBuilder name(final String name) {
|
||||
if (this.names == null) this.names = new java.util.ArrayList<String>();
|
||||
this.names.add(name);
|
||||
return this;
|
||||
}
|
||||
@org.checkerframework.checker.builder.qual.ReturnsReceiver
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public CheckerFrameworkBuilderBuilder names(final java.util.Collection<? extends String> names) {
|
||||
if (this.names == null) this.names = new java.util.ArrayList<String>();
|
||||
this.names.addAll(names);
|
||||
return this;
|
||||
}
|
||||
@org.checkerframework.checker.builder.qual.ReturnsReceiver
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public CheckerFrameworkBuilderBuilder clearNames() {
|
||||
if (this.names != null) this.names.clear();
|
||||
return this;
|
||||
}
|
||||
@org.checkerframework.dataflow.qual.SideEffectFree
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public CheckerFrameworkBuilder build(@org.checkerframework.checker.builder.qual.CalledMethods({"y", "z"}) CheckerFrameworkBuilderBuilder this) {
|
||||
java.util.List<String> names;
|
||||
switch (this.names == null ? 0 : this.names.size()) {
|
||||
case 0:
|
||||
names = java.util.Collections.emptyList();
|
||||
break;
|
||||
case 1:
|
||||
names = java.util.Collections.singletonList(this.names.get(0));
|
||||
break;
|
||||
default:
|
||||
names = java.util.Collections.unmodifiableList(new java.util.ArrayList<String>(this.names));
|
||||
}
|
||||
int x$value = this.x$value;
|
||||
if (!x$set) x$value = CheckerFrameworkBuilder.$default$x();
|
||||
return new CheckerFrameworkBuilder(x$value, y, z, names);
|
||||
}
|
||||
@org.checkerframework.dataflow.qual.SideEffectFree
|
||||
@java.lang.Override
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public java.lang.String toString() {
|
||||
return "CheckerFrameworkBuilder.CheckerFrameworkBuilderBuilder(x$value=" + this.x$value + ", y=" + this.y + ", z=" + this.z + ", names=" + this.names + ")";
|
||||
}
|
||||
}
|
||||
@org.checkerframework.common.aliasing.qual.Unique
|
||||
@org.checkerframework.dataflow.qual.SideEffectFree
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public static CheckerFrameworkBuilderBuilder builder() {
|
||||
return new CheckerFrameworkBuilderBuilder();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,202 @@
|
||||
// skip-idempotent
|
||||
import java.util.List;
|
||||
class CheckerFrameworkSuperBuilder {
|
||||
public static class Parent {
|
||||
int x;
|
||||
int y;
|
||||
int z;
|
||||
List<String> names;
|
||||
@java.lang.SuppressWarnings("all")
|
||||
private static int $default$x() {
|
||||
return 5;
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public static abstract class ParentBuilder<C extends Parent, B extends ParentBuilder<C, B>> {
|
||||
@java.lang.SuppressWarnings("all")
|
||||
private boolean x$set;
|
||||
@java.lang.SuppressWarnings("all")
|
||||
private int x$value;
|
||||
@java.lang.SuppressWarnings("all")
|
||||
private int y;
|
||||
@java.lang.SuppressWarnings("all")
|
||||
private int z;
|
||||
@java.lang.SuppressWarnings("all")
|
||||
private java.util.ArrayList<String> names;
|
||||
@org.checkerframework.checker.builder.qual.ReturnsReceiver
|
||||
@org.checkerframework.dataflow.qual.SideEffectFree
|
||||
@java.lang.SuppressWarnings("all")
|
||||
protected abstract B self();
|
||||
@org.checkerframework.dataflow.qual.SideEffectFree
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public abstract C build(@org.checkerframework.checker.builder.qual.CalledMethods({"y", "z"}) Parent this);
|
||||
@org.checkerframework.checker.builder.qual.ReturnsReceiver
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public B x(@org.checkerframework.checker.builder.qual.NotCalledMethods("x") ParentBuilder this, final int x) {
|
||||
this.x$value = x;
|
||||
x$set = true;
|
||||
return self();
|
||||
}
|
||||
@org.checkerframework.checker.builder.qual.ReturnsReceiver
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public B y(@org.checkerframework.checker.builder.qual.NotCalledMethods("y") ParentBuilder this, final int y) {
|
||||
this.y = y;
|
||||
return self();
|
||||
}
|
||||
@org.checkerframework.checker.builder.qual.ReturnsReceiver
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public B z(@org.checkerframework.checker.builder.qual.NotCalledMethods("z") ParentBuilder this, final int z) {
|
||||
this.z = z;
|
||||
return self();
|
||||
}
|
||||
@org.checkerframework.checker.builder.qual.ReturnsReceiver
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public B name(final String name) {
|
||||
if (this.names == null) this.names = new java.util.ArrayList<String>();
|
||||
this.names.add(name);
|
||||
return self();
|
||||
}
|
||||
@org.checkerframework.checker.builder.qual.ReturnsReceiver
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public B names(final java.util.Collection<? extends String> names) {
|
||||
if (this.names == null) this.names = new java.util.ArrayList<String>();
|
||||
this.names.addAll(names);
|
||||
return self();
|
||||
}
|
||||
@org.checkerframework.checker.builder.qual.ReturnsReceiver
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public B clearNames() {
|
||||
if (this.names != null) this.names.clear();
|
||||
return self();
|
||||
}
|
||||
@org.checkerframework.dataflow.qual.SideEffectFree
|
||||
@java.lang.Override
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public java.lang.String toString() {
|
||||
return "CheckerFrameworkSuperBuilder.Parent.ParentBuilder(x$value=" + this.x$value + ", y=" + this.y + ", z=" + this.z + ", names=" + this.names + ")";
|
||||
}
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
private static final class ParentBuilderImpl extends ParentBuilder<Parent, ParentBuilderImpl> {
|
||||
@org.checkerframework.common.aliasing.qual.Unique
|
||||
@java.lang.SuppressWarnings("all")
|
||||
private ParentBuilderImpl() {
|
||||
}
|
||||
@java.lang.Override
|
||||
@org.checkerframework.checker.builder.qual.ReturnsReceiver
|
||||
@org.checkerframework.dataflow.qual.SideEffectFree
|
||||
@java.lang.SuppressWarnings("all")
|
||||
protected ParentBuilderImpl self() {
|
||||
return this;
|
||||
}
|
||||
@org.checkerframework.dataflow.qual.SideEffectFree
|
||||
@java.lang.Override
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public Parent build(@org.checkerframework.checker.builder.qual.CalledMethods({"y", "z"}) ParentBuilderImpl this) {
|
||||
return new Parent(this);
|
||||
}
|
||||
}
|
||||
@org.checkerframework.dataflow.qual.SideEffectFree
|
||||
@java.lang.SuppressWarnings("all")
|
||||
protected Parent(final ParentBuilder<?, ?> b) {
|
||||
if (b.x$set) this.x = b.x$value;
|
||||
else this.x = Parent.$default$x();
|
||||
this.y = b.y;
|
||||
this.z = b.z;
|
||||
java.util.List<String> names;
|
||||
switch (b.names == null ? 0 : b.names.size()) {
|
||||
case 0:
|
||||
names = java.util.Collections.emptyList();
|
||||
break;
|
||||
case 1:
|
||||
names = java.util.Collections.singletonList(b.names.get(0));
|
||||
break;
|
||||
default:
|
||||
names = java.util.Collections.unmodifiableList(new java.util.ArrayList<String>(b.names));
|
||||
}
|
||||
this.names = names;
|
||||
}
|
||||
@org.checkerframework.dataflow.qual.SideEffectFree
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public static ParentBuilder<?, ?> builder() {
|
||||
return new ParentBuilderImpl();
|
||||
}
|
||||
}
|
||||
public static class Child extends Parent {
|
||||
int a;
|
||||
int b;
|
||||
@java.lang.SuppressWarnings("all")
|
||||
private static int $default$a() {
|
||||
return 1;
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public static abstract class ChildBuilder<C extends Child, B extends ChildBuilder<C, B>> extends Parent.ParentBuilder<C, B> {
|
||||
@java.lang.SuppressWarnings("all")
|
||||
private boolean a$set;
|
||||
@java.lang.SuppressWarnings("all")
|
||||
private int a$value;
|
||||
@java.lang.SuppressWarnings("all")
|
||||
private int b;
|
||||
@java.lang.Override
|
||||
@org.checkerframework.checker.builder.qual.ReturnsReceiver
|
||||
@org.checkerframework.dataflow.qual.SideEffectFree
|
||||
@java.lang.SuppressWarnings("all")
|
||||
protected abstract B self();
|
||||
@org.checkerframework.dataflow.qual.SideEffectFree
|
||||
@java.lang.Override
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public abstract C build(@org.checkerframework.checker.builder.qual.CalledMethods("b") Child this);
|
||||
@org.checkerframework.checker.builder.qual.ReturnsReceiver
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public B a(@org.checkerframework.checker.builder.qual.NotCalledMethods("a") ChildBuilder this, final int a) {
|
||||
this.a$value = a;
|
||||
a$set = true;
|
||||
return self();
|
||||
}
|
||||
@org.checkerframework.checker.builder.qual.ReturnsReceiver
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public B b(@org.checkerframework.checker.builder.qual.NotCalledMethods("b") ChildBuilder this, final int b) {
|
||||
this.b = b;
|
||||
return self();
|
||||
}
|
||||
@org.checkerframework.dataflow.qual.SideEffectFree
|
||||
@java.lang.Override
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public java.lang.String toString() {
|
||||
return "CheckerFrameworkSuperBuilder.Child.ChildBuilder(super=" + super.toString() + ", a$value=" + this.a$value + ", b=" + this.b + ")";
|
||||
}
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
private static final class ChildBuilderImpl extends ChildBuilder<Child, ChildBuilderImpl> {
|
||||
@org.checkerframework.common.aliasing.qual.Unique
|
||||
@java.lang.SuppressWarnings("all")
|
||||
private ChildBuilderImpl() {
|
||||
}
|
||||
@java.lang.Override
|
||||
@org.checkerframework.checker.builder.qual.ReturnsReceiver
|
||||
@org.checkerframework.dataflow.qual.SideEffectFree
|
||||
@java.lang.SuppressWarnings("all")
|
||||
protected ChildBuilderImpl self() {
|
||||
return this;
|
||||
}
|
||||
@org.checkerframework.dataflow.qual.SideEffectFree
|
||||
@java.lang.Override
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public Child build(@org.checkerframework.checker.builder.qual.CalledMethods("b") ChildBuilderImpl this) {
|
||||
return new Child(this);
|
||||
}
|
||||
}
|
||||
@org.checkerframework.dataflow.qual.SideEffectFree
|
||||
@java.lang.SuppressWarnings("all")
|
||||
protected Child(final ChildBuilder<?, ?> b) {
|
||||
super(b);
|
||||
if (b.a$set) this.a = b.a$value;
|
||||
else this.a = Child.$default$a();
|
||||
this.b = b.b;
|
||||
}
|
||||
@org.checkerframework.dataflow.qual.SideEffectFree
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public static ChildBuilder<?, ?> builder() {
|
||||
return new ChildBuilderImpl();
|
||||
}
|
||||
}
|
||||
}
|
||||
+6
-6
@@ -1,4 +1,4 @@
|
||||
class SetterAndWitherJavadoc {
|
||||
class SetterAndWithMethodJavadoc {
|
||||
/**
|
||||
* Some value.
|
||||
*/
|
||||
@@ -7,7 +7,7 @@ class SetterAndWitherJavadoc {
|
||||
* Some other value.
|
||||
*/
|
||||
int j;
|
||||
SetterAndWitherJavadoc(int i, int j) {
|
||||
SetterAndWithMethodJavadoc(int i, int j) {
|
||||
this.i = i;
|
||||
this.j = j;
|
||||
}
|
||||
@@ -24,8 +24,8 @@ class SetterAndWitherJavadoc {
|
||||
* @param the new value
|
||||
*/
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public SetterAndWitherJavadoc withI(final int i) {
|
||||
return this.i == i ? this : new SetterAndWitherJavadoc(i, this.j);
|
||||
public SetterAndWithMethodJavadoc withI(final int i) {
|
||||
return this.i == i ? this : new SetterAndWithMethodJavadoc(i, this.j);
|
||||
}
|
||||
/**
|
||||
* Set some other value.
|
||||
@@ -40,7 +40,7 @@ class SetterAndWitherJavadoc {
|
||||
* @param the other new other value
|
||||
*/
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public SetterAndWitherJavadoc withJ(final int j) {
|
||||
return this.j == j ? this : new SetterAndWitherJavadoc(this.i, j);
|
||||
public SetterAndWithMethodJavadoc withJ(final int j) {
|
||||
return this.j == j ? this : new SetterAndWithMethodJavadoc(this.i, j);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
class With1 {
|
||||
boolean foo;
|
||||
void withFoo(boolean foo) {
|
||||
}
|
||||
With1(boolean foo) {
|
||||
}
|
||||
}
|
||||
class With2 {
|
||||
boolean foo;
|
||||
void withFoo(String foo) {
|
||||
}
|
||||
With2(boolean foo) {
|
||||
}
|
||||
}
|
||||
class With3 {
|
||||
String foo;
|
||||
void withFoo(boolean foo) {
|
||||
}
|
||||
With3(String foo) {
|
||||
}
|
||||
}
|
||||
class With4 {
|
||||
String foo;
|
||||
void withFoo(String foo) {
|
||||
}
|
||||
With4(String foo) {
|
||||
}
|
||||
}
|
||||
class With5 {
|
||||
String foo;
|
||||
void withFoo() {
|
||||
}
|
||||
With5(String foo) {
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public With5 withFoo(final String foo) {
|
||||
return this.foo == foo ? this : new With5(foo);
|
||||
}
|
||||
}
|
||||
class With6 {
|
||||
String foo;
|
||||
void withFoo(String foo, int x) {
|
||||
}
|
||||
With6(String foo) {
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public With6 withFoo(final String foo) {
|
||||
return this.foo == foo ? this : new With6(foo);
|
||||
}
|
||||
}
|
||||
class With7 {
|
||||
String foo;
|
||||
void withFoo(String foo, Object... x) {
|
||||
}
|
||||
With7(String foo) {
|
||||
}
|
||||
}
|
||||
class With8 {
|
||||
boolean isFoo;
|
||||
void withIsFoo(boolean foo) {
|
||||
}
|
||||
With8(boolean foo) {
|
||||
}
|
||||
}
|
||||
class With9 {
|
||||
boolean isFoo;
|
||||
void withFoo(boolean foo) {
|
||||
}
|
||||
With9(boolean foo) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
class WithAndAllArgsConstructor<T, J extends T, L extends java.lang.Number> {
|
||||
J test;
|
||||
java.util.List<L> test2;
|
||||
final int x = 10;
|
||||
int y = 20;
|
||||
final int z;
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public WithAndAllArgsConstructor(final J test, final java.util.List<L> test2, final int y, final int z) {
|
||||
this.test = test;
|
||||
this.test2 = test2;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public WithAndAllArgsConstructor<T, J, L> withTest(final J test) {
|
||||
return this.test == test ? this : new WithAndAllArgsConstructor<T, J, L>(test, this.test2, this.y, this.z);
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public WithAndAllArgsConstructor<T, J, L> withTest2(final java.util.List<L> test2) {
|
||||
return this.test2 == test2 ? this : new WithAndAllArgsConstructor<T, J, L>(this.test, test2, this.y, this.z);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
abstract class WithMethodAbstract {
|
||||
String foo;
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public abstract WithMethodAbstract withFoo(final String foo);
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
class WithMethodMarkedDeprecated {
|
||||
@Deprecated
|
||||
int annotation;
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
int javadoc;
|
||||
WithMethodMarkedDeprecated(int annotation, int javadoc) {
|
||||
}
|
||||
@java.lang.Deprecated
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public WithMethodMarkedDeprecated withAnnotation(final int annotation) {
|
||||
return this.annotation == annotation ? this : new WithMethodMarkedDeprecated(annotation, this.javadoc);
|
||||
}
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
@java.lang.Deprecated
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public WithMethodMarkedDeprecated withJavadoc(final int javadoc) {
|
||||
return this.javadoc == javadoc ? this : new WithMethodMarkedDeprecated(this.annotation, javadoc);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
class WithOnClass1 {
|
||||
boolean isNone;
|
||||
boolean isPublic;
|
||||
WithOnClass1(boolean isNone, boolean isPublic) {
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public WithOnClass1 withPublic(final boolean isPublic) {
|
||||
return this.isPublic == isPublic ? this : new WithOnClass1(this.isNone, isPublic);
|
||||
}
|
||||
}
|
||||
class WithOnClass2 {
|
||||
boolean isNone;
|
||||
boolean isProtected;
|
||||
boolean isPackage;
|
||||
WithOnClass2(boolean isNone, boolean isProtected, boolean isPackage) {
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
protected WithOnClass2 withProtected(final boolean isProtected) {
|
||||
return this.isProtected == isProtected ? this : new WithOnClass2(this.isNone, isProtected, this.isPackage);
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
WithOnClass2 withPackage(final boolean isPackage) {
|
||||
return this.isPackage == isPackage ? this : new WithOnClass2(this.isNone, this.isProtected, isPackage);
|
||||
}
|
||||
}
|
||||
class WithOnClass3 {
|
||||
String couldBeNull;
|
||||
@lombok.NonNull
|
||||
String nonNull;
|
||||
WithOnClass3(String couldBeNull, String nonNull) {
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public WithOnClass3 withCouldBeNull(final String couldBeNull) {
|
||||
return this.couldBeNull == couldBeNull ? this : new WithOnClass3(couldBeNull, this.nonNull);
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public WithOnClass3 withNonNull(@lombok.NonNull final String nonNull) {
|
||||
if (nonNull == null) {
|
||||
throw new java.lang.NullPointerException("nonNull is marked non-null but is null");
|
||||
}
|
||||
return this.nonNull == nonNull ? this : new WithOnClass3(this.couldBeNull, nonNull);
|
||||
}
|
||||
}
|
||||
class WithOnClass4 {
|
||||
final int fX = 10;
|
||||
final int fY;
|
||||
WithOnClass4(int y) {
|
||||
this.fY = y;
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public WithOnClass4 withY(final int fY) {
|
||||
return this.fY == fY ? this : new WithOnClass4(fY);
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
class WitherOnStatic {
|
||||
class WithOnStatic {
|
||||
static boolean foo;
|
||||
static int bar;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
class WithPlain {
|
||||
int i;
|
||||
final int foo;
|
||||
WithPlain(int i, int foo) {
|
||||
this.i = i;
|
||||
this.foo = foo;
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public WithPlain withI(final int i) {
|
||||
return this.i == i ? this : new WithPlain(i, this.foo);
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public WithPlain withFoo(final int foo) {
|
||||
return this.foo == foo ? this : new WithPlain(this.i, foo);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class WithWithDollar {
|
||||
int $i;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
class WithWithGenerics<T, J extends T, L extends java.lang.Number> {
|
||||
J test;
|
||||
java.util.List<L> test2;
|
||||
java.util.List<? extends L> test3;
|
||||
int $i;
|
||||
public WithWithGenerics(J test, java.util.List<L> test2, java.util.List<? extends L> test3) {
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public WithWithGenerics<T, J, L> withTest(final J test) {
|
||||
return this.test == test ? this : new WithWithGenerics<T, J, L>(test, this.test2, this.test3);
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public WithWithGenerics<T, J, L> withTest2(final java.util.List<L> test2) {
|
||||
return this.test2 == test2 ? this : new WithWithGenerics<T, J, L>(this.test, test2, this.test3);
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public WithWithGenerics<T, J, L> withTest3(final java.util.List<? extends L> test3) {
|
||||
return this.test3 == test3 ? this : new WithWithGenerics<T, J, L>(this.test, this.test2, test3);
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -7,15 +7,15 @@ import java.util.List;
|
||||
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
|
||||
@interface TB {
|
||||
}
|
||||
class WitherTypeAnnos {
|
||||
class WithWithTypeAnnos {
|
||||
@TA
|
||||
@TB
|
||||
final List<String> foo;
|
||||
WitherTypeAnnos(@TA @TB List<String> foo) {
|
||||
WithWithTypeAnnos(@TA @TB List<String> foo) {
|
||||
this.foo = foo;
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public WitherTypeAnnos withFoo(@TA final List<String> foo) {
|
||||
return this.foo == foo ? this : new WitherTypeAnnos(foo);
|
||||
public WithWithTypeAnnos withFoo(@TA final List<String> foo) {
|
||||
return this.foo == foo ? this : new WithWithTypeAnnos(foo);
|
||||
}
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
class Wither1 {
|
||||
boolean foo;
|
||||
void withFoo(boolean foo) {
|
||||
}
|
||||
Wither1(boolean foo) {
|
||||
}
|
||||
}
|
||||
class Wither2 {
|
||||
boolean foo;
|
||||
void withFoo(String foo) {
|
||||
}
|
||||
Wither2(boolean foo) {
|
||||
}
|
||||
}
|
||||
class Wither3 {
|
||||
String foo;
|
||||
void withFoo(boolean foo) {
|
||||
}
|
||||
Wither3(String foo) {
|
||||
}
|
||||
}
|
||||
class Wither4 {
|
||||
String foo;
|
||||
void withFoo(String foo) {
|
||||
}
|
||||
Wither4(String foo) {
|
||||
}
|
||||
}
|
||||
class Wither5 {
|
||||
String foo;
|
||||
void withFoo() {
|
||||
}
|
||||
Wither5(String foo) {
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public Wither5 withFoo(final String foo) {
|
||||
return this.foo == foo ? this : new Wither5(foo);
|
||||
}
|
||||
}
|
||||
class Wither6 {
|
||||
String foo;
|
||||
void withFoo(String foo, int x) {
|
||||
}
|
||||
Wither6(String foo) {
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public Wither6 withFoo(final String foo) {
|
||||
return this.foo == foo ? this : new Wither6(foo);
|
||||
}
|
||||
}
|
||||
class Wither7 {
|
||||
String foo;
|
||||
void withFoo(String foo, Object... x) {
|
||||
}
|
||||
Wither7(String foo) {
|
||||
}
|
||||
}
|
||||
class Wither8 {
|
||||
boolean isFoo;
|
||||
void withIsFoo(boolean foo) {
|
||||
}
|
||||
Wither8(boolean foo) {
|
||||
}
|
||||
}
|
||||
class Wither9 {
|
||||
boolean isFoo;
|
||||
void withFoo(boolean foo) {
|
||||
}
|
||||
Wither9(boolean foo) {
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
class WitherAndAllArgsConstructor<T, J extends T, L extends java.lang.Number> {
|
||||
J test;
|
||||
java.util.List<L> test2;
|
||||
final int x = 10;
|
||||
int y = 20;
|
||||
final int z;
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public WitherAndAllArgsConstructor(final J test, final java.util.List<L> test2, final int y, final int z) {
|
||||
this.test = test;
|
||||
this.test2 = test2;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public WitherAndAllArgsConstructor<T, J, L> withTest(final J test) {
|
||||
return this.test == test ? this : new WitherAndAllArgsConstructor<T, J, L>(test, this.test2, this.y, this.z);
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public WitherAndAllArgsConstructor<T, J, L> withTest2(final java.util.List<L> test2) {
|
||||
return this.test2 == test2 ? this : new WitherAndAllArgsConstructor<T, J, L>(this.test, test2, this.y, this.z);
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
class WitherDeprecated {
|
||||
@Deprecated
|
||||
int annotation;
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
int javadoc;
|
||||
WitherDeprecated(int annotation, int javadoc) {
|
||||
}
|
||||
@java.lang.Deprecated
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public WitherDeprecated withAnnotation(final int annotation) {
|
||||
return this.annotation == annotation ? this : new WitherDeprecated(annotation, this.javadoc);
|
||||
}
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
@java.lang.Deprecated
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public WitherDeprecated withJavadoc(final int javadoc) {
|
||||
return this.javadoc == javadoc ? this : new WitherDeprecated(this.annotation, javadoc);
|
||||
}
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
class WitherOnClass1 {
|
||||
boolean isNone;
|
||||
boolean isPublic;
|
||||
WitherOnClass1(boolean isNone, boolean isPublic) {
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public WitherOnClass1 withPublic(final boolean isPublic) {
|
||||
return this.isPublic == isPublic ? this : new WitherOnClass1(this.isNone, isPublic);
|
||||
}
|
||||
}
|
||||
class WitherOnClass2 {
|
||||
boolean isNone;
|
||||
boolean isProtected;
|
||||
boolean isPackage;
|
||||
WitherOnClass2(boolean isNone, boolean isProtected, boolean isPackage) {
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
protected WitherOnClass2 withProtected(final boolean isProtected) {
|
||||
return this.isProtected == isProtected ? this : new WitherOnClass2(this.isNone, isProtected, this.isPackage);
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
WitherOnClass2 withPackage(final boolean isPackage) {
|
||||
return this.isPackage == isPackage ? this : new WitherOnClass2(this.isNone, this.isProtected, isPackage);
|
||||
}
|
||||
}
|
||||
class WitherOnClass3 {
|
||||
String couldBeNull;
|
||||
@lombok.NonNull
|
||||
String nonNull;
|
||||
WitherOnClass3(String couldBeNull, String nonNull) {
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public WitherOnClass3 withCouldBeNull(final String couldBeNull) {
|
||||
return this.couldBeNull == couldBeNull ? this : new WitherOnClass3(couldBeNull, this.nonNull);
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public WitherOnClass3 withNonNull(@lombok.NonNull final String nonNull) {
|
||||
if (nonNull == null) {
|
||||
throw new java.lang.NullPointerException("nonNull is marked non-null but is null");
|
||||
}
|
||||
return this.nonNull == nonNull ? this : new WitherOnClass3(this.couldBeNull, nonNull);
|
||||
}
|
||||
}
|
||||
class WitherOnClass4 {
|
||||
final int fX = 10;
|
||||
final int fY;
|
||||
WitherOnClass4(int y) {
|
||||
this.fY = y;
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public WitherOnClass4 withY(final int fY) {
|
||||
return this.fY == fY ? this : new WitherOnClass4(fY);
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
class WitherPlain {
|
||||
int i;
|
||||
final int foo;
|
||||
WitherPlain(int i, int foo) {
|
||||
this.i = i;
|
||||
this.foo = foo;
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public WitherPlain withI(final int i) {
|
||||
return this.i == i ? this : new WitherPlain(i, this.foo);
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public WitherPlain withFoo(final int foo) {
|
||||
return this.foo == foo ? this : new WitherPlain(this.i, foo);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
abstract class WitherWithAbstract {
|
||||
String foo;
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public abstract WitherWithAbstract withFoo(final String foo);
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
class WitherWithDollar {
|
||||
int $i;
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
class WitherWithGenerics<T, J extends T, L extends java.lang.Number> {
|
||||
J test;
|
||||
java.util.List<L> test2;
|
||||
java.util.List<? extends L> test3;
|
||||
int $i;
|
||||
public WitherWithGenerics(J test, java.util.List<L> test2, java.util.List<? extends L> test3) {
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public WitherWithGenerics<T, J, L> withTest(final J test) {
|
||||
return this.test == test ? this : new WitherWithGenerics<T, J, L>(test, this.test2, this.test3);
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public WitherWithGenerics<T, J, L> withTest2(final java.util.List<L> test2) {
|
||||
return this.test2 == test2 ? this : new WitherWithGenerics<T, J, L>(this.test, test2, this.test3);
|
||||
}
|
||||
@java.lang.SuppressWarnings("all")
|
||||
public WitherWithGenerics<T, J, L> withTest3(final java.util.List<? extends L> test3) {
|
||||
return this.test3 == test3 ? this : new WitherWithGenerics<T, J, L>(this.test, this.test2, test3);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
import lombok.With;
|
||||
@Data @Accessors(chain = true) class CheckerFrameworkBasic {
|
||||
private final @With int x;
|
||||
private final int y;
|
||||
private int z;
|
||||
public @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") CheckerFrameworkBasic withX(final int x) {
|
||||
return ((this.x == x) ? this : new CheckerFrameworkBasic(x, this.y, this.z));
|
||||
}
|
||||
public @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") int getX() {
|
||||
return this.x;
|
||||
}
|
||||
public @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") int getY() {
|
||||
return this.y;
|
||||
}
|
||||
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) {
|
||||
this.z = z;
|
||||
return this;
|
||||
}
|
||||
public @java.lang.Override @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) {
|
||||
if ((o == this))
|
||||
return true;
|
||||
if ((! (o instanceof CheckerFrameworkBasic)))
|
||||
return false;
|
||||
final CheckerFrameworkBasic other = (CheckerFrameworkBasic) o;
|
||||
if ((! other.canEqual((java.lang.Object) this)))
|
||||
return false;
|
||||
if ((this.getX() != other.getX()))
|
||||
return false;
|
||||
if ((this.getY() != other.getY()))
|
||||
return false;
|
||||
if ((this.getZ() != other.getZ()))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
protected @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") boolean canEqual(final java.lang.Object other) {
|
||||
return (other instanceof CheckerFrameworkBasic);
|
||||
}
|
||||
public @java.lang.Override @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") int hashCode() {
|
||||
final int PRIME = 59;
|
||||
int result = 1;
|
||||
result = ((result * PRIME) + this.getX());
|
||||
result = ((result * PRIME) + this.getY());
|
||||
result = ((result * PRIME) + this.getZ());
|
||||
return result;
|
||||
}
|
||||
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) {
|
||||
super();
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
import java.util.List;
|
||||
import lombok.Builder;
|
||||
import lombok.Singular;
|
||||
@Builder class CheckerFrameworkBuilder {
|
||||
public static @java.lang.SuppressWarnings("all") class CheckerFrameworkBuilderBuilder {
|
||||
private @java.lang.SuppressWarnings("all") int x$value;
|
||||
private @java.lang.SuppressWarnings("all") boolean x$set;
|
||||
private @java.lang.SuppressWarnings("all") int y;
|
||||
private @java.lang.SuppressWarnings("all") int z;
|
||||
private @java.lang.SuppressWarnings("all") java.util.ArrayList<String> names;
|
||||
@org.checkerframework.common.aliasing.qual.Unique @java.lang.SuppressWarnings("all") CheckerFrameworkBuilderBuilder() {
|
||||
super();
|
||||
}
|
||||
public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") CheckerFrameworkBuilderBuilder x(final @org.checkerframework.checker.builder.qual.NotCalledMethods("x") CheckerFrameworkBuilderBuilder this, final int x) {
|
||||
this.x$value = x;
|
||||
x$set = true;
|
||||
return this;
|
||||
}
|
||||
public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") CheckerFrameworkBuilderBuilder y(final @org.checkerframework.checker.builder.qual.NotCalledMethods("y") CheckerFrameworkBuilderBuilder this, final int y) {
|
||||
this.y = y;
|
||||
return this;
|
||||
}
|
||||
public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") CheckerFrameworkBuilderBuilder z(final @org.checkerframework.checker.builder.qual.NotCalledMethods("z") CheckerFrameworkBuilderBuilder this, final int z) {
|
||||
this.z = z;
|
||||
return this;
|
||||
}
|
||||
public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") CheckerFrameworkBuilderBuilder name(final String name) {
|
||||
if ((this.names == null))
|
||||
this.names = new java.util.ArrayList<String>();
|
||||
this.names.add(name);
|
||||
return this;
|
||||
}
|
||||
public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") CheckerFrameworkBuilderBuilder names(final java.util.Collection<? extends String> names) {
|
||||
if ((this.names == null))
|
||||
this.names = new java.util.ArrayList<String>();
|
||||
this.names.addAll(names);
|
||||
return this;
|
||||
}
|
||||
public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") CheckerFrameworkBuilderBuilder clearNames() {
|
||||
if ((this.names != null))
|
||||
this.names.clear();
|
||||
return this;
|
||||
}
|
||||
public @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") CheckerFrameworkBuilder build(final @org.checkerframework.checker.builder.qual.CalledMethods({"y", "z"}) CheckerFrameworkBuilderBuilder this) {
|
||||
java.util.List<String> names;
|
||||
switch (((this.names == null) ? 0 : this.names.size())) {
|
||||
case 0 :
|
||||
names = java.util.Collections.emptyList();
|
||||
break;
|
||||
case 1 :
|
||||
names = java.util.Collections.singletonList(this.names.get(0));
|
||||
break;
|
||||
default :
|
||||
names = java.util.Collections.unmodifiableList(new java.util.ArrayList<String>(this.names));
|
||||
}
|
||||
return new CheckerFrameworkBuilder((x$set ? x$value : CheckerFrameworkBuilder.$default$x()), y, z, names);
|
||||
}
|
||||
public @java.lang.Override @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") java.lang.String toString() {
|
||||
return (((((((("CheckerFrameworkBuilder.CheckerFrameworkBuilderBuilder(x$value=" + this.x$value) + ", y=") + this.y) + ", z=") + this.z) + ", names=") + this.names) + ")");
|
||||
}
|
||||
}
|
||||
@Builder.Default int x;
|
||||
int y;
|
||||
int z;
|
||||
@Singular List<String> names;
|
||||
private static @java.lang.SuppressWarnings("all") int $default$x() {
|
||||
return 5;
|
||||
}
|
||||
@org.checkerframework.common.aliasing.qual.Unique @java.lang.SuppressWarnings("all") CheckerFrameworkBuilder(final int x, final int y, final int z, final List<String> names) {
|
||||
super();
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
this.names = names;
|
||||
}
|
||||
public static @org.checkerframework.common.aliasing.qual.Unique @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") CheckerFrameworkBuilderBuilder builder() {
|
||||
return new CheckerFrameworkBuilderBuilder();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
import java.util.List;
|
||||
import lombok.Singular;
|
||||
class CheckerFrameworkSuperBuilder {
|
||||
public static @lombok.experimental.SuperBuilder class Parent {
|
||||
public static abstract @java.lang.SuppressWarnings("all") class ParentBuilder<C extends Parent, B extends ParentBuilder<C, B>> {
|
||||
private @java.lang.SuppressWarnings("all") int x$value;
|
||||
private @java.lang.SuppressWarnings("all") boolean x$set;
|
||||
private @java.lang.SuppressWarnings("all") int y;
|
||||
private @java.lang.SuppressWarnings("all") int z;
|
||||
private @java.lang.SuppressWarnings("all") java.util.ArrayList<String> names;
|
||||
public ParentBuilder() {
|
||||
}
|
||||
protected abstract @org.checkerframework.checker.builder.qual.ReturnsReceiver @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") B self();
|
||||
public abstract @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") C build(final @org.checkerframework.checker.builder.qual.CalledMethods({"y", "z"}) ParentBuilder this);
|
||||
public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") B x(final @org.checkerframework.checker.builder.qual.NotCalledMethods("x") ParentBuilder this, final int x) {
|
||||
this.x$value = x;
|
||||
x$set = true;
|
||||
return self();
|
||||
}
|
||||
public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") B y(final @org.checkerframework.checker.builder.qual.NotCalledMethods("y") ParentBuilder this, final int y) {
|
||||
this.y = y;
|
||||
return self();
|
||||
}
|
||||
public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") B z(final @org.checkerframework.checker.builder.qual.NotCalledMethods("z") ParentBuilder this, final int z) {
|
||||
this.z = z;
|
||||
return self();
|
||||
}
|
||||
public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") B name(final String name) {
|
||||
if ((this.names == null))
|
||||
this.names = new java.util.ArrayList<String>();
|
||||
this.names.add(name);
|
||||
return self();
|
||||
}
|
||||
public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") B names(final java.util.Collection<? extends String> names) {
|
||||
if ((this.names == null))
|
||||
this.names = new java.util.ArrayList<String>();
|
||||
this.names.addAll(names);
|
||||
return self();
|
||||
}
|
||||
public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") B clearNames() {
|
||||
if ((this.names != null))
|
||||
this.names.clear();
|
||||
return self();
|
||||
}
|
||||
public @java.lang.Override @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") java.lang.String toString() {
|
||||
return (((((((("CheckerFrameworkSuperBuilder.Parent.ParentBuilder(x$value=" + this.x$value) + ", y=") + this.y) + ", z=") + this.z) + ", names=") + this.names) + ")");
|
||||
}
|
||||
}
|
||||
private static final @java.lang.SuppressWarnings("all") class ParentBuilderImpl extends ParentBuilder<Parent, ParentBuilderImpl> {
|
||||
private ParentBuilderImpl() {
|
||||
}
|
||||
protected @java.lang.Override @org.checkerframework.checker.builder.qual.ReturnsReceiver @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") ParentBuilderImpl self() {
|
||||
return this;
|
||||
}
|
||||
public @java.lang.Override @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") Parent build(final @org.checkerframework.checker.builder.qual.CalledMethods({"y", "z"}) ParentBuilderImpl this) {
|
||||
return new Parent(this);
|
||||
}
|
||||
}
|
||||
@lombok.Builder.Default int x;
|
||||
int y;
|
||||
int z;
|
||||
@Singular List<String> names;
|
||||
private static @java.lang.SuppressWarnings("all") int $default$x() {
|
||||
return 5;
|
||||
}
|
||||
protected @org.checkerframework.common.aliasing.qual.Unique @java.lang.SuppressWarnings("all") Parent(final ParentBuilder<?, ?> b) {
|
||||
super();
|
||||
if (b.x$set)
|
||||
this.x = b.x$value;
|
||||
else
|
||||
this.x = Parent.$default$x();
|
||||
this.y = b.y;
|
||||
this.z = b.z;
|
||||
java.util.List<String> names;
|
||||
switch (((b.names == null) ? 0 : b.names.size())) {
|
||||
case 0 :
|
||||
names = java.util.Collections.emptyList();
|
||||
break;
|
||||
case 1 :
|
||||
names = java.util.Collections.singletonList(b.names.get(0));
|
||||
break;
|
||||
default :
|
||||
names = java.util.Collections.unmodifiableList(new java.util.ArrayList<String>(b.names));
|
||||
}
|
||||
this.names = names;
|
||||
}
|
||||
public static @org.checkerframework.common.aliasing.qual.Unique @java.lang.SuppressWarnings("all") ParentBuilder<?, ?> builder() {
|
||||
return new ParentBuilderImpl();
|
||||
}
|
||||
}
|
||||
public static @lombok.experimental.SuperBuilder class Child extends Parent {
|
||||
public static abstract @java.lang.SuppressWarnings("all") class ChildBuilder<C extends Child, B extends ChildBuilder<C, B>> extends Parent.ParentBuilder<C, B> {
|
||||
private @java.lang.SuppressWarnings("all") int a$value;
|
||||
private @java.lang.SuppressWarnings("all") boolean a$set;
|
||||
private @java.lang.SuppressWarnings("all") int b;
|
||||
public ChildBuilder() {
|
||||
}
|
||||
protected abstract @java.lang.Override @org.checkerframework.checker.builder.qual.ReturnsReceiver @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") B self();
|
||||
public abstract @java.lang.Override @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") C build(final @org.checkerframework.checker.builder.qual.CalledMethods("b") ChildBuilder this);
|
||||
public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") B a(final @org.checkerframework.checker.builder.qual.NotCalledMethods("a") ChildBuilder this, final int a) {
|
||||
this.a$value = a;
|
||||
a$set = true;
|
||||
return self();
|
||||
}
|
||||
public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") B b(final @org.checkerframework.checker.builder.qual.NotCalledMethods("b") ChildBuilder this, final int b) {
|
||||
this.b = b;
|
||||
return self();
|
||||
}
|
||||
public @java.lang.Override @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") java.lang.String toString() {
|
||||
return (((((("CheckerFrameworkSuperBuilder.Child.ChildBuilder(super=" + super.toString()) + ", a$value=") + this.a$value) + ", b=") + this.b) + ")");
|
||||
}
|
||||
}
|
||||
private static final @java.lang.SuppressWarnings("all") class ChildBuilderImpl extends ChildBuilder<Child, ChildBuilderImpl> {
|
||||
private ChildBuilderImpl() {
|
||||
}
|
||||
protected @java.lang.Override @org.checkerframework.checker.builder.qual.ReturnsReceiver @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") ChildBuilderImpl self() {
|
||||
return this;
|
||||
}
|
||||
public @java.lang.Override @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") Child build(final @org.checkerframework.checker.builder.qual.CalledMethods("b") ChildBuilderImpl this) {
|
||||
return new Child(this);
|
||||
}
|
||||
}
|
||||
@lombok.Builder.Default int a;
|
||||
int b;
|
||||
private static @java.lang.SuppressWarnings("all") int $default$a() {
|
||||
return 1;
|
||||
}
|
||||
protected @org.checkerframework.common.aliasing.qual.Unique @java.lang.SuppressWarnings("all") Child(final ChildBuilder<?, ?> b) {
|
||||
super(b);
|
||||
if (b.a$set)
|
||||
this.a = b.a$value;
|
||||
else
|
||||
this.a = Child.$default$a();
|
||||
this.b = b.b;
|
||||
}
|
||||
public static @org.checkerframework.common.aliasing.qual.Unique @java.lang.SuppressWarnings("all") ChildBuilder<?, ?> builder() {
|
||||
return new ChildBuilderImpl();
|
||||
}
|
||||
}
|
||||
CheckerFrameworkSuperBuilder() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import lombok.With;
|
||||
class SetterAndWithMethodJavadoc {
|
||||
@lombok.Setter @lombok.With int i;
|
||||
@lombok.Setter @lombok.With int j;
|
||||
SetterAndWithMethodJavadoc(int i, int j) {
|
||||
super();
|
||||
this.i = i;
|
||||
this.j = j;
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") void setI(final int i) {
|
||||
this.i = i;
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") SetterAndWithMethodJavadoc withI(final int i) {
|
||||
return ((this.i == i) ? this : new SetterAndWithMethodJavadoc(i, this.j));
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") void setJ(final int j) {
|
||||
this.j = j;
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") SetterAndWithMethodJavadoc withJ(final int j) {
|
||||
return ((this.j == j) ? this : new SetterAndWithMethodJavadoc(this.i, j));
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
import lombok.experimental.Wither;
|
||||
class SetterAndWitherJavadoc {
|
||||
@lombok.Setter @lombok.experimental.Wither int i;
|
||||
@lombok.Setter @lombok.experimental.Wither int j;
|
||||
SetterAndWitherJavadoc(int i, int j) {
|
||||
super();
|
||||
this.i = i;
|
||||
this.j = j;
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") void setI(final int i) {
|
||||
this.i = i;
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") SetterAndWitherJavadoc withI(final int i) {
|
||||
return ((this.i == i) ? this : new SetterAndWitherJavadoc(i, this.j));
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") void setJ(final int j) {
|
||||
this.j = j;
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") SetterAndWitherJavadoc withJ(final int j) {
|
||||
return ((this.j == j) ? this : new SetterAndWitherJavadoc(this.i, j));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
class With1 {
|
||||
@lombok.With boolean foo;
|
||||
void withFoo(boolean foo) {
|
||||
}
|
||||
With1(boolean foo) {
|
||||
super();
|
||||
}
|
||||
}
|
||||
class With2 {
|
||||
@lombok.With boolean foo;
|
||||
void withFoo(String foo) {
|
||||
}
|
||||
With2(boolean foo) {
|
||||
super();
|
||||
}
|
||||
}
|
||||
class With3 {
|
||||
@lombok.With String foo;
|
||||
void withFoo(boolean foo) {
|
||||
}
|
||||
With3(String foo) {
|
||||
super();
|
||||
}
|
||||
}
|
||||
class With4 {
|
||||
@lombok.With String foo;
|
||||
void withFoo(String foo) {
|
||||
}
|
||||
With4(String foo) {
|
||||
super();
|
||||
}
|
||||
}
|
||||
class With5 {
|
||||
@lombok.With String foo;
|
||||
void withFoo() {
|
||||
}
|
||||
With5(String foo) {
|
||||
super();
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") With5 withFoo(final String foo) {
|
||||
return ((this.foo == foo) ? this : new With5(foo));
|
||||
}
|
||||
}
|
||||
class With6 {
|
||||
@lombok.With String foo;
|
||||
void withFoo(String foo, int x) {
|
||||
}
|
||||
With6(String foo) {
|
||||
super();
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") With6 withFoo(final String foo) {
|
||||
return ((this.foo == foo) ? this : new With6(foo));
|
||||
}
|
||||
}
|
||||
class With7 {
|
||||
@lombok.With String foo;
|
||||
void withFoo(String foo, Object... x) {
|
||||
}
|
||||
With7(String foo) {
|
||||
super();
|
||||
}
|
||||
}
|
||||
class With8 {
|
||||
@lombok.With boolean isFoo;
|
||||
void withIsFoo(boolean foo) {
|
||||
}
|
||||
With8(boolean foo) {
|
||||
super();
|
||||
}
|
||||
}
|
||||
class With9 {
|
||||
@lombok.With boolean isFoo;
|
||||
void withFoo(boolean foo) {
|
||||
}
|
||||
With9(boolean foo) {
|
||||
super();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
@lombok.AllArgsConstructor class WithAndAllArgsConstructor<T, J extends T, L extends java.lang.Number> {
|
||||
@lombok.With J test;
|
||||
@lombok.With java.util.List<L> test2;
|
||||
final int x = 10;
|
||||
int y = 20;
|
||||
final int z;
|
||||
public @java.lang.SuppressWarnings("all") WithAndAllArgsConstructor<T, J, L> withTest(final J test) {
|
||||
return ((this.test == test) ? this : new WithAndAllArgsConstructor<T, J, L>(test, this.test2, this.y, this.z));
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") WithAndAllArgsConstructor<T, J, L> withTest2(final java.util.List<L> test2) {
|
||||
return ((this.test2 == test2) ? this : new WithAndAllArgsConstructor<T, J, L>(this.test, test2, this.y, this.z));
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") WithAndAllArgsConstructor(final J test, final java.util.List<L> test2, final int y, final int z) {
|
||||
super();
|
||||
this.test = test;
|
||||
this.test2 = test2;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
abstract class WithMethodAbstract {
|
||||
@lombok.With String foo;
|
||||
WithMethodAbstract() {
|
||||
super();
|
||||
}
|
||||
public abstract @java.lang.SuppressWarnings("all") WithMethodAbstract withFoo(final String foo);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import lombok.With;
|
||||
class WithMethodMarkedDeprecated {
|
||||
@Deprecated @With int annotation;
|
||||
@With int javadoc;
|
||||
WithMethodMarkedDeprecated(int annotation, int javadoc) {
|
||||
super();
|
||||
}
|
||||
public @java.lang.Deprecated @java.lang.SuppressWarnings("all") WithMethodMarkedDeprecated withAnnotation(final int annotation) {
|
||||
return ((this.annotation == annotation) ? this : new WithMethodMarkedDeprecated(annotation, this.javadoc));
|
||||
}
|
||||
public @java.lang.Deprecated @java.lang.SuppressWarnings("all") WithMethodMarkedDeprecated withJavadoc(final int javadoc) {
|
||||
return ((this.javadoc == javadoc) ? this : new WithMethodMarkedDeprecated(this.annotation, javadoc));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
@lombok.With class WithOnClass1 {
|
||||
@lombok.With(lombok.AccessLevel.NONE) boolean isNone;
|
||||
boolean isPublic;
|
||||
WithOnClass1(boolean isNone, boolean isPublic) {
|
||||
super();
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") WithOnClass1 withPublic(final boolean isPublic) {
|
||||
return ((this.isPublic == isPublic) ? this : new WithOnClass1(this.isNone, isPublic));
|
||||
}
|
||||
}
|
||||
@lombok.With(lombok.AccessLevel.PROTECTED) class WithOnClass2 {
|
||||
@lombok.With(lombok.AccessLevel.NONE) boolean isNone;
|
||||
boolean isProtected;
|
||||
@lombok.With(lombok.AccessLevel.PACKAGE) boolean isPackage;
|
||||
WithOnClass2(boolean isNone, boolean isProtected, boolean isPackage) {
|
||||
super();
|
||||
}
|
||||
@java.lang.SuppressWarnings("all") WithOnClass2 withPackage(final boolean isPackage) {
|
||||
return ((this.isPackage == isPackage) ? this : new WithOnClass2(this.isNone, this.isProtected, isPackage));
|
||||
}
|
||||
protected @java.lang.SuppressWarnings("all") WithOnClass2 withProtected(final boolean isProtected) {
|
||||
return ((this.isProtected == isProtected) ? this : new WithOnClass2(this.isNone, isProtected, this.isPackage));
|
||||
}
|
||||
}
|
||||
@lombok.With class WithOnClass3 {
|
||||
String couldBeNull;
|
||||
@lombok.NonNull String nonNull;
|
||||
WithOnClass3(String couldBeNull, String nonNull) {
|
||||
super();
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") WithOnClass3 withCouldBeNull(final String couldBeNull) {
|
||||
return ((this.couldBeNull == couldBeNull) ? this : new WithOnClass3(couldBeNull, this.nonNull));
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") WithOnClass3 withNonNull(final @lombok.NonNull String nonNull) {
|
||||
if ((nonNull == null))
|
||||
{
|
||||
throw new java.lang.NullPointerException("nonNull is marked non-null but is null");
|
||||
}
|
||||
return ((this.nonNull == nonNull) ? this : new WithOnClass3(this.couldBeNull, nonNull));
|
||||
}
|
||||
}
|
||||
@lombok.With @lombok.experimental.Accessors(prefix = "f") class WithOnClass4 {
|
||||
final int fX = 10;
|
||||
final int fY;
|
||||
WithOnClass4(int y) {
|
||||
super();
|
||||
this.fY = y;
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") WithOnClass4 withY(final int fY) {
|
||||
return ((this.fY == fY) ? this : new WithOnClass4(fY));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
class WithOnStatic {
|
||||
static @lombok.With boolean foo;
|
||||
static @lombok.With int bar;
|
||||
<clinit>() {
|
||||
}
|
||||
WithOnStatic() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import lombok.With;
|
||||
class WithPlain {
|
||||
@lombok.With int i;
|
||||
final @With int foo;
|
||||
WithPlain(int i, int foo) {
|
||||
super();
|
||||
this.i = i;
|
||||
this.foo = foo;
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") WithPlain withI(final int i) {
|
||||
return ((this.i == i) ? this : new WithPlain(i, this.foo));
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") WithPlain withFoo(final int foo) {
|
||||
return ((this.foo == foo) ? this : new WithPlain(this.i, foo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
class WithWithDollar {
|
||||
@lombok.With int $i;
|
||||
WithWithDollar() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
class WithWithGenerics<T, J extends T, L extends java.lang.Number> {
|
||||
@lombok.With J test;
|
||||
@lombok.With java.util.List<L> test2;
|
||||
@lombok.With java.util.List<? extends L> test3;
|
||||
int $i;
|
||||
public WithWithGenerics(J test, java.util.List<L> test2, java.util.List<? extends L> test3) {
|
||||
super();
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") WithWithGenerics<T, J, L> withTest(final J test) {
|
||||
return ((this.test == test) ? this : new WithWithGenerics<T, J, L>(test, this.test2, this.test3));
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") WithWithGenerics<T, J, L> withTest2(final java.util.List<L> test2) {
|
||||
return ((this.test2 == test2) ? this : new WithWithGenerics<T, J, L>(this.test, test2, this.test3));
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") WithWithGenerics<T, J, L> withTest3(final java.util.List<? extends L> test3) {
|
||||
return ((this.test3 == test3) ? this : new WithWithGenerics<T, J, L>(this.test, this.test2, test3));
|
||||
}
|
||||
}
|
||||
+6
-6
@@ -1,4 +1,4 @@
|
||||
import lombok.experimental.Wither;
|
||||
import lombok.With;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Target;
|
||||
import java.util.List;
|
||||
@@ -6,13 +6,13 @@ import java.util.List;
|
||||
}
|
||||
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER}) @interface TB {
|
||||
}
|
||||
class WitherTypeAnnos {
|
||||
final @Wither @TA @TB List<String> foo;
|
||||
WitherTypeAnnos(@TA @TB List<String> foo) {
|
||||
class WithWithTypeAnnos {
|
||||
final @With @TA @TB List<String> foo;
|
||||
WithWithTypeAnnos(@TA @TB List<String> foo) {
|
||||
super();
|
||||
this.foo = foo;
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") WitherTypeAnnos withFoo(final @TA List<String> foo) {
|
||||
return ((this.foo == foo) ? this : new WitherTypeAnnos(foo));
|
||||
public @java.lang.SuppressWarnings("all") WithWithTypeAnnos withFoo(final @TA List<String> foo) {
|
||||
return ((this.foo == foo) ? this : new WithWithTypeAnnos(foo));
|
||||
}
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
class Wither1 {
|
||||
@lombok.experimental.Wither boolean foo;
|
||||
void withFoo(boolean foo) {
|
||||
}
|
||||
Wither1(boolean foo) {
|
||||
super();
|
||||
}
|
||||
}
|
||||
class Wither2 {
|
||||
@lombok.experimental.Wither boolean foo;
|
||||
void withFoo(String foo) {
|
||||
}
|
||||
Wither2(boolean foo) {
|
||||
super();
|
||||
}
|
||||
}
|
||||
class Wither3 {
|
||||
@lombok.experimental.Wither String foo;
|
||||
void withFoo(boolean foo) {
|
||||
}
|
||||
Wither3(String foo) {
|
||||
super();
|
||||
}
|
||||
}
|
||||
class Wither4 {
|
||||
@lombok.experimental.Wither String foo;
|
||||
void withFoo(String foo) {
|
||||
}
|
||||
Wither4(String foo) {
|
||||
super();
|
||||
}
|
||||
}
|
||||
class Wither5 {
|
||||
@lombok.experimental.Wither String foo;
|
||||
void withFoo() {
|
||||
}
|
||||
Wither5(String foo) {
|
||||
super();
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") Wither5 withFoo(final String foo) {
|
||||
return ((this.foo == foo) ? this : new Wither5(foo));
|
||||
}
|
||||
}
|
||||
class Wither6 {
|
||||
@lombok.experimental.Wither String foo;
|
||||
void withFoo(String foo, int x) {
|
||||
}
|
||||
Wither6(String foo) {
|
||||
super();
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") Wither6 withFoo(final String foo) {
|
||||
return ((this.foo == foo) ? this : new Wither6(foo));
|
||||
}
|
||||
}
|
||||
class Wither7 {
|
||||
@lombok.experimental.Wither String foo;
|
||||
void withFoo(String foo, Object... x) {
|
||||
}
|
||||
Wither7(String foo) {
|
||||
super();
|
||||
}
|
||||
}
|
||||
class Wither8 {
|
||||
@lombok.experimental.Wither boolean isFoo;
|
||||
void withIsFoo(boolean foo) {
|
||||
}
|
||||
Wither8(boolean foo) {
|
||||
super();
|
||||
}
|
||||
}
|
||||
class Wither9 {
|
||||
@lombok.experimental.Wither boolean isFoo;
|
||||
void withFoo(boolean foo) {
|
||||
}
|
||||
Wither9(boolean foo) {
|
||||
super();
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
@lombok.AllArgsConstructor class WitherAndAllArgsConstructor<T, J extends T, L extends java.lang.Number> {
|
||||
@lombok.experimental.Wither J test;
|
||||
@lombok.experimental.Wither java.util.List<L> test2;
|
||||
final int x = 10;
|
||||
int y = 20;
|
||||
final int z;
|
||||
public @java.lang.SuppressWarnings("all") WitherAndAllArgsConstructor<T, J, L> withTest(final J test) {
|
||||
return ((this.test == test) ? this : new WitherAndAllArgsConstructor<T, J, L>(test, this.test2, this.y, this.z));
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") WitherAndAllArgsConstructor<T, J, L> withTest2(final java.util.List<L> test2) {
|
||||
return ((this.test2 == test2) ? this : new WitherAndAllArgsConstructor<T, J, L>(this.test, test2, this.y, this.z));
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") WitherAndAllArgsConstructor(final J test, final java.util.List<L> test2, final int y, final int z) {
|
||||
super();
|
||||
this.test = test;
|
||||
this.test2 = test2;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
import lombok.experimental.Wither;
|
||||
class WitherDeprecated {
|
||||
@Deprecated @Wither int annotation;
|
||||
@Wither int javadoc;
|
||||
WitherDeprecated(int annotation, int javadoc) {
|
||||
super();
|
||||
}
|
||||
public @java.lang.Deprecated @java.lang.SuppressWarnings("all") WitherDeprecated withAnnotation(final int annotation) {
|
||||
return ((this.annotation == annotation) ? this : new WitherDeprecated(annotation, this.javadoc));
|
||||
}
|
||||
public @java.lang.Deprecated @java.lang.SuppressWarnings("all") WitherDeprecated withJavadoc(final int javadoc) {
|
||||
return ((this.javadoc == javadoc) ? this : new WitherDeprecated(this.annotation, javadoc));
|
||||
}
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
@lombok.experimental.Wither class WitherOnClass1 {
|
||||
@lombok.experimental.Wither(lombok.AccessLevel.NONE) boolean isNone;
|
||||
boolean isPublic;
|
||||
WitherOnClass1(boolean isNone, boolean isPublic) {
|
||||
super();
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") WitherOnClass1 withPublic(final boolean isPublic) {
|
||||
return ((this.isPublic == isPublic) ? this : new WitherOnClass1(this.isNone, isPublic));
|
||||
}
|
||||
}
|
||||
@lombok.experimental.Wither(lombok.AccessLevel.PROTECTED) class WitherOnClass2 {
|
||||
@lombok.experimental.Wither(lombok.AccessLevel.NONE) boolean isNone;
|
||||
boolean isProtected;
|
||||
@lombok.experimental.Wither(lombok.AccessLevel.PACKAGE) boolean isPackage;
|
||||
WitherOnClass2(boolean isNone, boolean isProtected, boolean isPackage) {
|
||||
super();
|
||||
}
|
||||
@java.lang.SuppressWarnings("all") WitherOnClass2 withPackage(final boolean isPackage) {
|
||||
return ((this.isPackage == isPackage) ? this : new WitherOnClass2(this.isNone, this.isProtected, isPackage));
|
||||
}
|
||||
protected @java.lang.SuppressWarnings("all") WitherOnClass2 withProtected(final boolean isProtected) {
|
||||
return ((this.isProtected == isProtected) ? this : new WitherOnClass2(this.isNone, isProtected, this.isPackage));
|
||||
}
|
||||
}
|
||||
@lombok.experimental.Wither class WitherOnClass3 {
|
||||
String couldBeNull;
|
||||
@lombok.NonNull String nonNull;
|
||||
WitherOnClass3(String couldBeNull, String nonNull) {
|
||||
super();
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") WitherOnClass3 withCouldBeNull(final String couldBeNull) {
|
||||
return ((this.couldBeNull == couldBeNull) ? this : new WitherOnClass3(couldBeNull, this.nonNull));
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") WitherOnClass3 withNonNull(final @lombok.NonNull String nonNull) {
|
||||
if ((nonNull == null))
|
||||
{
|
||||
throw new java.lang.NullPointerException("nonNull is marked non-null but is null");
|
||||
}
|
||||
return ((this.nonNull == nonNull) ? this : new WitherOnClass3(this.couldBeNull, nonNull));
|
||||
}
|
||||
}
|
||||
@lombok.experimental.Wither @lombok.experimental.Accessors(prefix = "f") class WitherOnClass4 {
|
||||
final int fX = 10;
|
||||
final int fY;
|
||||
WitherOnClass4(int y) {
|
||||
super();
|
||||
this.fY = y;
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") WitherOnClass4 withY(final int fY) {
|
||||
return ((this.fY == fY) ? this : new WitherOnClass4(fY));
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
class WitherOnStatic {
|
||||
static @lombok.experimental.Wither boolean foo;
|
||||
static @lombok.experimental.Wither int bar;
|
||||
<clinit>() {
|
||||
}
|
||||
WitherOnStatic() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
import lombok.experimental.Wither;
|
||||
class WitherPlain {
|
||||
@lombok.experimental.Wither int i;
|
||||
final @Wither int foo;
|
||||
WitherPlain(int i, int foo) {
|
||||
super();
|
||||
this.i = i;
|
||||
this.foo = foo;
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") WitherPlain withI(final int i) {
|
||||
return ((this.i == i) ? this : new WitherPlain(i, this.foo));
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") WitherPlain withFoo(final int foo) {
|
||||
return ((this.foo == foo) ? this : new WitherPlain(this.i, foo));
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
abstract class WitherWithAbstract {
|
||||
@lombok.experimental.Wither String foo;
|
||||
WitherWithAbstract() {
|
||||
super();
|
||||
}
|
||||
public abstract @java.lang.SuppressWarnings("all") WitherWithAbstract withFoo(final String foo);
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
class WitherWithDollar {
|
||||
@lombok.experimental.Wither int $i;
|
||||
WitherWithDollar() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
class WitherWithGenerics<T, J extends T, L extends java.lang.Number> {
|
||||
@lombok.experimental.Wither J test;
|
||||
@lombok.experimental.Wither java.util.List<L> test2;
|
||||
@lombok.experimental.Wither java.util.List<? extends L> test3;
|
||||
int $i;
|
||||
public WitherWithGenerics(J test, java.util.List<L> test2, java.util.List<? extends L> test3) {
|
||||
super();
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") WitherWithGenerics<T, J, L> withTest(final J test) {
|
||||
return ((this.test == test) ? this : new WitherWithGenerics<T, J, L>(test, this.test2, this.test3));
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") WitherWithGenerics<T, J, L> withTest2(final java.util.List<L> test2) {
|
||||
return ((this.test2 == test2) ? this : new WitherWithGenerics<T, J, L>(this.test, test2, this.test3));
|
||||
}
|
||||
public @java.lang.SuppressWarnings("all") WitherWithGenerics<T, J, L> withTest3(final java.util.List<? extends L> test3) {
|
||||
return ((this.test3 == test3) ? this : new WitherWithGenerics<T, J, L>(this.test, this.test2, test3));
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
class BuilderInvalidUse {
|
||||
private int something;
|
||||
|
||||
@lombok.Getter @lombok.Setter @lombok.experimental.FieldDefaults(makeFinal = true) @lombok.experimental.Wither @lombok.Data @lombok.ToString @lombok.EqualsAndHashCode
|
||||
@lombok.Getter @lombok.Setter @lombok.experimental.FieldDefaults(makeFinal = true) @lombok.With @lombok.Data @lombok.ToString @lombok.EqualsAndHashCode
|
||||
@lombok.AllArgsConstructor
|
||||
public static class BuilderInvalidUseBuilder {
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
//CONF: checkerframework = 3.0
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
import lombok.With;
|
||||
|
||||
@Data @Accessors(chain = true)
|
||||
class CheckerFrameworkBasic {
|
||||
@With private final int x;
|
||||
private final int y;
|
||||
private int z;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
//CONF: checkerframework = true
|
||||
import java.util.List;
|
||||
import lombok.Builder;
|
||||
import lombok.Singular;
|
||||
|
||||
@Builder
|
||||
class CheckerFrameworkBuilder {
|
||||
@Builder.Default int x = 5;
|
||||
int y;
|
||||
int z;
|
||||
@Singular List<String> names;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
//CONF: checkerframework = true
|
||||
import java.util.List;
|
||||
import lombok.Singular;
|
||||
|
||||
class CheckerFrameworkSuperBuilder {
|
||||
@lombok.experimental.SuperBuilder
|
||||
public static class Parent {
|
||||
@lombok.Builder.Default int x = 5;
|
||||
int y;
|
||||
int z;
|
||||
@Singular List<String> names;
|
||||
}
|
||||
|
||||
@lombok.experimental.SuperBuilder
|
||||
public static class Child extends Parent {
|
||||
@lombok.Builder.Default int a = 1;
|
||||
int b;
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,11 @@
|
||||
//skip compare content
|
||||
//CONF: lombok.Getter.flagUsage = WARNING
|
||||
//CONF: lombok.experimental.flagUsage = ERROR
|
||||
@lombok.experimental.FieldNameConstants
|
||||
public class FlagUsages {
|
||||
@lombok.Getter String x;
|
||||
|
||||
@lombok.experimental.Wither String z;
|
||||
String z;
|
||||
|
||||
public FlagUsages(String x, String y) {
|
||||
}
|
||||
|
||||
+6
-6
@@ -1,10 +1,10 @@
|
||||
import lombok.experimental.Wither;
|
||||
class SetterAndWitherJavadoc {
|
||||
import lombok.With;
|
||||
class SetterAndWithMethodJavadoc {
|
||||
/**
|
||||
* Some value.
|
||||
* @param the new value
|
||||
*/
|
||||
@lombok.Setter @lombok.experimental.Wither int i;
|
||||
@lombok.Setter @lombok.With int i;
|
||||
|
||||
/**
|
||||
* Some other value.
|
||||
@@ -13,13 +13,13 @@ class SetterAndWitherJavadoc {
|
||||
* Set some other value.
|
||||
* @param the new other value
|
||||
*
|
||||
* --- WITHER ---
|
||||
* --- WITH ---
|
||||
* Reinstantiate with some other value.
|
||||
* @param the other new other value
|
||||
*/
|
||||
@lombok.Setter @lombok.experimental.Wither int j;
|
||||
@lombok.Setter @lombok.With int j;
|
||||
|
||||
SetterAndWitherJavadoc(int i, int j) {
|
||||
SetterAndWithMethodJavadoc(int i, int j) {
|
||||
this.i = i;
|
||||
this.j = j;
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
class With1 {
|
||||
@lombok.With boolean foo;
|
||||
|
||||
void withFoo(boolean foo) {
|
||||
}
|
||||
|
||||
With1(boolean foo) {
|
||||
}
|
||||
}
|
||||
|
||||
class With2 {
|
||||
@lombok.With boolean foo;
|
||||
|
||||
void withFoo(String foo) {
|
||||
}
|
||||
|
||||
With2(boolean foo) {
|
||||
}
|
||||
}
|
||||
|
||||
class With3 {
|
||||
@lombok.With String foo;
|
||||
|
||||
void withFoo(boolean foo) {
|
||||
}
|
||||
|
||||
With3(String foo) {
|
||||
}
|
||||
}
|
||||
|
||||
class With4 {
|
||||
@lombok.With String foo;
|
||||
|
||||
void withFoo(String foo) {
|
||||
}
|
||||
|
||||
With4(String foo) {
|
||||
}
|
||||
}
|
||||
|
||||
class With5 {
|
||||
@lombok.With String foo;
|
||||
|
||||
void withFoo() {
|
||||
}
|
||||
|
||||
With5(String foo) {
|
||||
}
|
||||
}
|
||||
|
||||
class With6 {
|
||||
@lombok.With String foo;
|
||||
|
||||
void withFoo(String foo, int x) {
|
||||
}
|
||||
|
||||
With6(String foo) {
|
||||
}
|
||||
}
|
||||
|
||||
class With7 {
|
||||
@lombok.With String foo;
|
||||
|
||||
void withFoo(String foo, Object... x) {
|
||||
}
|
||||
|
||||
With7(String foo) {
|
||||
}
|
||||
}
|
||||
|
||||
class With8 {
|
||||
@lombok.With boolean isFoo;
|
||||
|
||||
void withIsFoo(boolean foo) {
|
||||
}
|
||||
|
||||
With8(boolean foo) {
|
||||
}
|
||||
}
|
||||
|
||||
class With9 {
|
||||
@lombok.With boolean isFoo;
|
||||
|
||||
void withFoo(boolean foo) {
|
||||
}
|
||||
|
||||
With9(boolean foo) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
@lombok.AllArgsConstructor
|
||||
class WithAndAllArgsConstructor<T, J extends T, L extends java.lang.Number> {
|
||||
@lombok.With J test;
|
||||
|
||||
@lombok.With java.util.List<L> test2;
|
||||
|
||||
final int x = 10;
|
||||
|
||||
int y = 20;
|
||||
|
||||
final int z;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
abstract class WithMethodAbstract {
|
||||
@lombok.With String foo;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import lombok.With;
|
||||
|
||||
class WithMethodMarkedDeprecated {
|
||||
|
||||
@Deprecated
|
||||
@With int annotation;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
@With int javadoc;
|
||||
|
||||
WithMethodMarkedDeprecated(int annotation, int javadoc) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
@lombok.With
|
||||
class WithOnClass1 {
|
||||
@lombok.With(lombok.AccessLevel.NONE)
|
||||
boolean isNone;
|
||||
|
||||
boolean isPublic;
|
||||
|
||||
WithOnClass1(boolean isNone, boolean isPublic) {
|
||||
}
|
||||
}
|
||||
|
||||
@lombok.With(lombok.AccessLevel.PROTECTED)
|
||||
class WithOnClass2 {
|
||||
@lombok.With(lombok.AccessLevel.NONE)
|
||||
boolean isNone;
|
||||
|
||||
boolean isProtected;
|
||||
|
||||
@lombok.With(lombok.AccessLevel.PACKAGE)
|
||||
boolean isPackage;
|
||||
|
||||
WithOnClass2(boolean isNone, boolean isProtected, boolean isPackage) {
|
||||
}
|
||||
}
|
||||
|
||||
@lombok.With
|
||||
class WithOnClass3 {
|
||||
String couldBeNull;
|
||||
|
||||
@lombok.NonNull String nonNull;
|
||||
|
||||
WithOnClass3(String couldBeNull, String nonNull) {
|
||||
}
|
||||
}
|
||||
|
||||
@lombok.With @lombok.experimental.Accessors(prefix="f")
|
||||
class WithOnClass4 {
|
||||
final int fX = 10;
|
||||
|
||||
final int fY;
|
||||
|
||||
WithOnClass4(int y) {
|
||||
this.fY = y;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
class WithOnStatic {
|
||||
@lombok.With static boolean foo;
|
||||
@lombok.With static int bar;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import lombok.With;
|
||||
class WithPlain {
|
||||
@lombok.With int i;
|
||||
@With final int foo;
|
||||
|
||||
WithPlain(int i, int foo) {
|
||||
this.i = i;
|
||||
this.foo = foo;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
class WithWithDollar {
|
||||
@lombok.With int $i;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
class WithWithGenerics<T, J extends T, L extends java.lang.Number> {
|
||||
@lombok.With J test;
|
||||
@lombok.With java.util.List<L> test2;
|
||||
@lombok.With java.util.List<? extends L> test3;
|
||||
int $i;
|
||||
|
||||
public WithWithGenerics(J test, java.util.List<L> test2, java.util.List<? extends L> test3) {
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -1,5 +1,5 @@
|
||||
//CONF: lombok.copyableAnnotations += TA
|
||||
import lombok.experimental.Wither;
|
||||
import lombok.With;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Target;
|
||||
import java.util.List;
|
||||
@@ -9,10 +9,10 @@ import java.util.List;
|
||||
@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
|
||||
@interface TB {
|
||||
}
|
||||
class WitherTypeAnnos {
|
||||
@Wither final @TA @TB List<String> foo;
|
||||
class WithWithTypeAnnos {
|
||||
@With final @TA @TB List<String> foo;
|
||||
|
||||
WitherTypeAnnos(@TA @TB List<String> foo) {
|
||||
WithWithTypeAnnos(@TA @TB List<String> foo) {
|
||||
this.foo = foo;
|
||||
}
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
class Wither1 {
|
||||
@lombok.experimental.Wither boolean foo;
|
||||
|
||||
void withFoo(boolean foo) {
|
||||
}
|
||||
|
||||
Wither1(boolean foo) {
|
||||
}
|
||||
}
|
||||
|
||||
class Wither2 {
|
||||
@lombok.experimental.Wither boolean foo;
|
||||
|
||||
void withFoo(String foo) {
|
||||
}
|
||||
|
||||
Wither2(boolean foo) {
|
||||
}
|
||||
}
|
||||
|
||||
class Wither3 {
|
||||
@lombok.experimental.Wither String foo;
|
||||
|
||||
void withFoo(boolean foo) {
|
||||
}
|
||||
|
||||
Wither3(String foo) {
|
||||
}
|
||||
}
|
||||
|
||||
class Wither4 {
|
||||
@lombok.experimental.Wither String foo;
|
||||
|
||||
void withFoo(String foo) {
|
||||
}
|
||||
|
||||
Wither4(String foo) {
|
||||
}
|
||||
}
|
||||
|
||||
class Wither5 {
|
||||
@lombok.experimental.Wither String foo;
|
||||
|
||||
void withFoo() {
|
||||
}
|
||||
|
||||
Wither5(String foo) {
|
||||
}
|
||||
}
|
||||
|
||||
class Wither6 {
|
||||
@lombok.experimental.Wither String foo;
|
||||
|
||||
void withFoo(String foo, int x) {
|
||||
}
|
||||
|
||||
Wither6(String foo) {
|
||||
}
|
||||
}
|
||||
|
||||
class Wither7 {
|
||||
@lombok.experimental.Wither String foo;
|
||||
|
||||
void withFoo(String foo, Object... x) {
|
||||
}
|
||||
|
||||
Wither7(String foo) {
|
||||
}
|
||||
}
|
||||
|
||||
class Wither8 {
|
||||
@lombok.experimental.Wither boolean isFoo;
|
||||
|
||||
void withIsFoo(boolean foo) {
|
||||
}
|
||||
|
||||
Wither8(boolean foo) {
|
||||
}
|
||||
}
|
||||
|
||||
class Wither9 {
|
||||
@lombok.experimental.Wither boolean isFoo;
|
||||
|
||||
void withFoo(boolean foo) {
|
||||
}
|
||||
|
||||
Wither9(boolean foo) {
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
@lombok.AllArgsConstructor
|
||||
class WitherAndAllArgsConstructor<T, J extends T, L extends java.lang.Number> {
|
||||
@lombok.experimental.Wither J test;
|
||||
|
||||
@lombok.experimental.Wither java.util.List<L> test2;
|
||||
|
||||
final int x = 10;
|
||||
|
||||
int y = 20;
|
||||
|
||||
final int z;
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
import lombok.experimental.Wither;
|
||||
|
||||
class WitherDeprecated {
|
||||
|
||||
@Deprecated
|
||||
@Wither int annotation;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
@Wither int javadoc;
|
||||
|
||||
WitherDeprecated(int annotation, int javadoc) {
|
||||
}
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
@lombok.experimental.Wither
|
||||
class WitherOnClass1 {
|
||||
@lombok.experimental.Wither(lombok.AccessLevel.NONE)
|
||||
boolean isNone;
|
||||
|
||||
boolean isPublic;
|
||||
|
||||
WitherOnClass1(boolean isNone, boolean isPublic) {
|
||||
}
|
||||
}
|
||||
|
||||
@lombok.experimental.Wither(lombok.AccessLevel.PROTECTED)
|
||||
class WitherOnClass2 {
|
||||
@lombok.experimental.Wither(lombok.AccessLevel.NONE)
|
||||
boolean isNone;
|
||||
|
||||
boolean isProtected;
|
||||
|
||||
@lombok.experimental.Wither(lombok.AccessLevel.PACKAGE)
|
||||
boolean isPackage;
|
||||
|
||||
WitherOnClass2(boolean isNone, boolean isProtected, boolean isPackage) {
|
||||
}
|
||||
}
|
||||
|
||||
@lombok.experimental.Wither
|
||||
class WitherOnClass3 {
|
||||
String couldBeNull;
|
||||
|
||||
@lombok.NonNull String nonNull;
|
||||
|
||||
WitherOnClass3(String couldBeNull, String nonNull) {
|
||||
}
|
||||
}
|
||||
|
||||
@lombok.experimental.Wither @lombok.experimental.Accessors(prefix="f")
|
||||
class WitherOnClass4 {
|
||||
final int fX = 10;
|
||||
|
||||
final int fY;
|
||||
|
||||
WitherOnClass4(int y) {
|
||||
this.fY = y;
|
||||
}
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
class WitherOnStatic {
|
||||
@lombok.experimental.Wither static boolean foo;
|
||||
@lombok.experimental.Wither static int bar;
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
import lombok.experimental.Wither;
|
||||
class WitherPlain {
|
||||
@lombok.experimental.Wither int i;
|
||||
@Wither final int foo;
|
||||
|
||||
WitherPlain(int i, int foo) {
|
||||
this.i = i;
|
||||
this.foo = foo;
|
||||
}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
abstract class WitherWithAbstract {
|
||||
@lombok.experimental.Wither String foo;
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
class WitherWithDollar {
|
||||
@lombok.experimental.Wither int $i;
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
class WitherWithGenerics<T, J extends T, L extends java.lang.Number> {
|
||||
@lombok.experimental.Wither J test;
|
||||
@lombok.experimental.Wither java.util.List<L> test2;
|
||||
@lombok.experimental.Wither java.util.List<? extends L> test3;
|
||||
int $i;
|
||||
|
||||
public WitherWithGenerics(J test, java.util.List<L> test2, java.util.List<? extends L> test3) {
|
||||
}
|
||||
}
|
||||
@@ -1,2 +1,2 @@
|
||||
2 @Getter, @Setter, @Wither, @Data, @ToString, @EqualsAndHashCode, @AllArgsConstructor are not allowed on builder classes.
|
||||
2 @Getter, @Setter, @With, @Data, @ToString, @EqualsAndHashCode, @AllArgsConstructor are not allowed on builder classes.
|
||||
13 @Value is not allowed on builder classes.
|
||||
@@ -0,0 +1,4 @@
|
||||
6 package org.checkerframework.common.aliasing.qual does not exist
|
||||
8 package org.checkerframework.dataflow.qual does not exist
|
||||
9 package org.checkerframework.dataflow.qual does not exist
|
||||
10 package org.checkerframework.dataflow.qual does not exist
|
||||
@@ -0,0 +1 @@
|
||||
6 package org.checkerframework.common.aliasing.qual does not exist
|
||||
@@ -0,0 +1,3 @@
|
||||
6 package org.checkerframework.dataflow.qual does not exist
|
||||
-1 package org.checkerframework.checker.builder.qual does not exist
|
||||
14 package org.checkerframework.dataflow.qual does not exist
|
||||
@@ -1,2 +1,2 @@
|
||||
5 Use of @Getter is flagged according to lombok configuration.
|
||||
7 Use of any lombok.experimental feature is flagged according to lombok configuration.
|
||||
4 Use of any lombok.experimental feature is flagged according to lombok configuration.
|
||||
6 Use of @Getter is flagged according to lombok configuration.
|
||||
File renamed without changes.
@@ -0,0 +1,2 @@
|
||||
2 Not generating withFoo for this field: With methods cannot be generated for static fields.
|
||||
3 Not generating withBar for this field: With methods cannot be generated for static fields.
|
||||
@@ -0,0 +1 @@
|
||||
2 Not generating with$i for this field: With methods cannot be generated for fields starting with $.
|
||||
@@ -1,2 +0,0 @@
|
||||
2 Not generating wither for this field: Withers cannot be generated for static fields.
|
||||
3 Not generating wither for this field: Withers cannot be generated for static fields.
|
||||
@@ -1 +0,0 @@
|
||||
2 Not generating wither for this field: Withers cannot be generated for fields starting with $.
|
||||
@@ -1,2 +1,2 @@
|
||||
2 @Getter, @Setter, @FieldDefaults, @Wither, @Data, @ToString, @EqualsAndHashCode, @AllArgsConstructor are not allowed on builder classes.
|
||||
2 @Getter, @Setter, @FieldDefaults, @With, @Data, @ToString, @EqualsAndHashCode, @AllArgsConstructor are not allowed on builder classes.
|
||||
13 @Value is not allowed on builder classes.
|
||||
@@ -0,0 +1 @@
|
||||
8 org.checkerframework cannot be resolved to a type
|
||||
@@ -0,0 +1 @@
|
||||
6 org.checkerframework cannot be resolved to a type
|
||||
@@ -0,0 +1 @@
|
||||
6 org.checkerframework cannot be resolved to a type
|
||||
@@ -1,2 +1,2 @@
|
||||
5 Use of @Getter is flagged according to lombok configuration.
|
||||
7 Use of any lombok.experimental feature is flagged according to lombok configuration.
|
||||
4 Use of any lombok.experimental feature is flagged according to lombok configuration.
|
||||
6 Use of @Getter is flagged according to lombok configuration.
|
||||
File renamed without changes.
@@ -0,0 +1,2 @@
|
||||
2 Not generating withFoo for this field: With methods cannot be generated for static fields.
|
||||
3 Not generating withBar for this field: With methods cannot be generated for static fields.
|
||||
@@ -0,0 +1 @@
|
||||
2 Not generating with$i for this field: With methods cannot be generated for fields starting with $.
|
||||
@@ -0,0 +1 @@
|
||||
4 The type Wither is deprecated
|
||||
@@ -1,2 +0,0 @@
|
||||
2 Not generating wither for this field: Withers cannot be generated for static fields.
|
||||
3 Not generating wither for this field: Withers cannot be generated for static fields.
|
||||
@@ -1 +0,0 @@
|
||||
2 Not generating wither for this field: Withers cannot be generated for fields starting with $.
|
||||
@@ -0,0 +1,10 @@
|
||||
5 package org.checkerframework.common.aliasing.qual does not exist
|
||||
11 package org.checkerframework.dataflow.qual does not exist
|
||||
16 package org.checkerframework.dataflow.qual does not exist
|
||||
21 package org.checkerframework.dataflow.qual does not exist
|
||||
26 package org.checkerframework.checker.builder.qual does not exist
|
||||
32 package org.checkerframework.dataflow.qual does not exist
|
||||
45 package org.checkerframework.dataflow.qual does not exist
|
||||
50 package org.checkerframework.dataflow.qual does not exist
|
||||
61 package org.checkerframework.dataflow.qual does not exist
|
||||
67 package org.checkerframework.dataflow.qual does not exist
|
||||
Reference in new issue
Block a user