aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-ecj
diff options
context:
space:
mode:
authorReinier Zwitserloot <r.zwitserloot@projectlombok.org>2020-07-10 02:51:00 +0200
committerReinier Zwitserloot <r.zwitserloot@projectlombok.org>2020-07-10 02:57:45 +0200
commit4fdcdd126a4b5ce365b97eb498536d04caee3b53 (patch)
treea811ffdc55b68d3f5c0bb01a65fb1e4a49fdef8a /test/transform/resource/after-ecj
parent1fd2401bade3db3bb3a1bd88727823776f39be0c (diff)
downloadlombok-4fdcdd126a4b5ce365b97eb498536d04caee3b53.tar.gz
lombok-4fdcdd126a4b5ce365b97eb498536d04caee3b53.tar.bz2
lombok-4fdcdd126a4b5ce365b97eb498536d04caee3b53.zip
[test] this covers more eclipse versions
Diffstat (limited to 'test/transform/resource/after-ecj')
-rw-r--r--test/transform/resource/after-ecj/CheckerFrameworkSuperBuilder.java32
-rw-r--r--test/transform/resource/after-ecj/EqualsAndHashCodeAnnotated.java53
-rw-r--r--test/transform/resource/after-ecj/ValLambda.java6
3 files changed, 73 insertions, 18 deletions
diff --git a/test/transform/resource/after-ecj/CheckerFrameworkSuperBuilder.java b/test/transform/resource/after-ecj/CheckerFrameworkSuperBuilder.java
index 43568236..7c8ff0ed 100644
--- a/test/transform/resource/after-ecj/CheckerFrameworkSuperBuilder.java
+++ b/test/transform/resource/after-ecj/CheckerFrameworkSuperBuilder.java
@@ -94,38 +94,38 @@ class CheckerFrameworkSuperBuilder {
return new CheckerFrameworkSuperBuilder.Parent.ParentBuilderImpl();
}
}
- public static @lombok.experimental.SuperBuilder class Child extends Parent {
- public static abstract @java.lang.SuppressWarnings("all") class ChildBuilder<C extends CheckerFrameworkSuperBuilder.Child, B extends CheckerFrameworkSuperBuilder.Child.ChildBuilder<C, B>> extends Parent.ParentBuilder<C, B> {
+ public static @lombok.experimental.SuperBuilder class ZChild extends Parent {
+ public static abstract @java.lang.SuppressWarnings("all") class ZChildBuilder<C extends CheckerFrameworkSuperBuilder.ZChild, B extends CheckerFrameworkSuperBuilder.ZChild.ZChildBuilder<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() {
+ public ZChildBuilder() {
super();
}
protected abstract @java.lang.Override @org.checkerframework.checker.builder.qual.ReturnsReceiver @org.checkerframework.dataflow.qual.Pure @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") CheckerFrameworkSuperBuilder.Child.ChildBuilder this);
- public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") B a(final @org.checkerframework.checker.builder.qual.NotCalledMethods("a") CheckerFrameworkSuperBuilder.Child.ChildBuilder this, final int a) {
+ public abstract @java.lang.Override @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") C build(final @org.checkerframework.checker.builder.qual.CalledMethods("b") CheckerFrameworkSuperBuilder.ZChild.ZChildBuilder this);
+ public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") B a(final @org.checkerframework.checker.builder.qual.NotCalledMethods("a") CheckerFrameworkSuperBuilder.ZChild.ZChildBuilder 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") CheckerFrameworkSuperBuilder.Child.ChildBuilder this, final int b) {
+ public @org.checkerframework.checker.builder.qual.ReturnsReceiver @java.lang.SuppressWarnings("all") B b(final @org.checkerframework.checker.builder.qual.NotCalledMethods("b") CheckerFrameworkSuperBuilder.ZChild.ZChildBuilder 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) + ")");
+ return (((((("CheckerFrameworkSuperBuilder.ZChild.ZChildBuilder(super=" + super.toString()) + ", a$value=") + this.a$value) + ", b=") + this.b) + ")");
}
}
- private static final @java.lang.SuppressWarnings("all") class ChildBuilderImpl extends CheckerFrameworkSuperBuilder.Child.ChildBuilder<CheckerFrameworkSuperBuilder.Child, CheckerFrameworkSuperBuilder.Child.ChildBuilderImpl> {
- private ChildBuilderImpl() {
+ private static final @java.lang.SuppressWarnings("all") class ZChildBuilderImpl extends CheckerFrameworkSuperBuilder.ZChild.ZChildBuilder<CheckerFrameworkSuperBuilder.ZChild, CheckerFrameworkSuperBuilder.ZChild.ZChildBuilderImpl> {
+ private ZChildBuilderImpl() {
super();
}
- protected @java.lang.Override @org.checkerframework.checker.builder.qual.ReturnsReceiver @org.checkerframework.dataflow.qual.Pure @java.lang.SuppressWarnings("all") CheckerFrameworkSuperBuilder.Child.ChildBuilderImpl self() {
+ protected @java.lang.Override @org.checkerframework.checker.builder.qual.ReturnsReceiver @org.checkerframework.dataflow.qual.Pure @java.lang.SuppressWarnings("all") CheckerFrameworkSuperBuilder.ZChild.ZChildBuilderImpl self() {
return this;
}
- public @java.lang.Override @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") CheckerFrameworkSuperBuilder.Child build(final @org.checkerframework.checker.builder.qual.CalledMethods("b") CheckerFrameworkSuperBuilder.Child.ChildBuilderImpl this) {
- return new CheckerFrameworkSuperBuilder.Child(this);
+ public @java.lang.Override @org.checkerframework.dataflow.qual.SideEffectFree @java.lang.SuppressWarnings("all") CheckerFrameworkSuperBuilder.ZChild build(final @org.checkerframework.checker.builder.qual.CalledMethods("b") CheckerFrameworkSuperBuilder.ZChild.ZChildBuilderImpl this) {
+ return new CheckerFrameworkSuperBuilder.ZChild(this);
}
}
@lombok.Builder.Default int a;
@@ -133,16 +133,16 @@ class CheckerFrameworkSuperBuilder {
private static @java.lang.SuppressWarnings("all") int $default$a() {
return 1;
}
- protected @org.checkerframework.common.aliasing.qual.Unique @java.lang.SuppressWarnings("all") Child(final CheckerFrameworkSuperBuilder.Child.ChildBuilder<?, ?> b) {
+ protected @org.checkerframework.common.aliasing.qual.Unique @java.lang.SuppressWarnings("all") ZChild(final CheckerFrameworkSuperBuilder.ZChild.ZChildBuilder<?, ?> b) {
super(b);
if (b.a$set)
this.a = b.a$value;
else
- this.a = CheckerFrameworkSuperBuilder.Child.$default$a();
+ this.a = CheckerFrameworkSuperBuilder.ZChild.$default$a();
this.b = b.b;
}
- public static @org.checkerframework.common.aliasing.qual.Unique @java.lang.SuppressWarnings("all") CheckerFrameworkSuperBuilder.Child.ChildBuilder<?, ?> builder() {
- return new CheckerFrameworkSuperBuilder.Child.ChildBuilderImpl();
+ public static @org.checkerframework.common.aliasing.qual.Unique @java.lang.SuppressWarnings("all") CheckerFrameworkSuperBuilder.ZChild.ZChildBuilder<?, ?> builder() {
+ return new CheckerFrameworkSuperBuilder.ZChild.ZChildBuilderImpl();
}
}
CheckerFrameworkSuperBuilder() {
diff --git a/test/transform/resource/after-ecj/EqualsAndHashCodeAnnotated.java b/test/transform/resource/after-ecj/EqualsAndHashCodeAnnotated.java
new file mode 100644
index 00000000..4e377fb4
--- /dev/null
+++ b/test/transform/resource/after-ecj/EqualsAndHashCodeAnnotated.java
@@ -0,0 +1,53 @@
+import java.lang.annotation.*;
+@lombok.EqualsAndHashCode class EqualsAndHashCodeAnnotated {
+ @Target(ElementType.TYPE_USE) @Retention(RetentionPolicy.SOURCE) @interface Annotated {
+ }
+ @Annotated int primitive;
+ @Annotated Object object;
+ int @Annotated [] primitiveValues;
+ int @Annotated [] @Annotated [] morePrimitiveValues;
+ Integer @Annotated [] objectValues;
+ Integer @Annotated [] @Annotated [] moreObjectValues;
+ EqualsAndHashCodeAnnotated() {
+ super();
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) {
+ if ((o == this))
+ return true;
+ if ((! (o instanceof EqualsAndHashCodeAnnotated)))
+ return false;
+ final EqualsAndHashCodeAnnotated other = (EqualsAndHashCodeAnnotated) o;
+ if ((! other.canEqual((java.lang.Object) this)))
+ return false;
+ if ((this.primitive != other.primitive))
+ return false;
+ final java.lang.Object this$object = this.object;
+ final java.lang.Object other$object = other.object;
+ if (((this$object == null) ? (other$object != null) : (! this$object.equals(other$object))))
+ return false;
+ if ((! java.util.Arrays.equals(this.primitiveValues, other.primitiveValues)))
+ return false;
+ if ((! java.util.Arrays.deepEquals(this.morePrimitiveValues, other.morePrimitiveValues)))
+ return false;
+ if ((! java.util.Arrays.deepEquals(this.objectValues, other.objectValues)))
+ return false;
+ if ((! java.util.Arrays.deepEquals(this.moreObjectValues, other.moreObjectValues)))
+ return false;
+ return true;
+ }
+ protected @java.lang.SuppressWarnings("all") boolean canEqual(final java.lang.Object other) {
+ return (other instanceof EqualsAndHashCodeAnnotated);
+ }
+ public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() {
+ final int PRIME = 59;
+ int result = 1;
+ result = ((result * PRIME) + this.primitive);
+ final java.lang.Object $object = this.object;
+ result = ((result * PRIME) + (($object == null) ? 43 : $object.hashCode()));
+ result = ((result * PRIME) + java.util.Arrays.hashCode(this.primitiveValues));
+ result = ((result * PRIME) + java.util.Arrays.deepHashCode(this.morePrimitiveValues));
+ result = ((result * PRIME) + java.util.Arrays.deepHashCode(this.objectValues));
+ result = ((result * PRIME) + java.util.Arrays.deepHashCode(this.moreObjectValues));
+ return result;
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/after-ecj/ValLambda.java b/test/transform/resource/after-ecj/ValLambda.java
index 5b52869f..6b59bdbd 100644
--- a/test/transform/resource/after-ecj/ValLambda.java
+++ b/test/transform/resource/after-ecj/ValLambda.java
@@ -1,3 +1,5 @@
+import java.io.Serializable;
+
class ValLambda {
static {
final @lombok.val java.lang.Runnable foo = ((System.currentTimeMillis() > 0) ? (Runnable) () -> {
@@ -16,8 +18,8 @@ class ValLambda {
final @lombok.val java.lang.Runnable foo = (Runnable) () -> {
};
}
- public void easyIntersectionLambda() {
- final @lombok.val java.lang.Runnable foo = (Runnable & java.io.Serializable) () -> {
+ public void intersectionLambda() {
+ final @lombok.val java.io.Serializable foo = (Runnable & Serializable) () -> {
};
final @lombok.val java.io.Serializable bar = (java.io.Serializable & Runnable) () -> {
};