diff options
Diffstat (limited to 'test/transform/resource/after-ecj')
26 files changed, 1050 insertions, 0 deletions
diff --git a/test/transform/resource/after-ecj/ClassNamedAfterGetter.java b/test/transform/resource/after-ecj/ClassNamedAfterGetter.java new file mode 100644 index 00000000..fdb6f122 --- /dev/null +++ b/test/transform/resource/after-ecj/ClassNamedAfterGetter.java @@ -0,0 +1,9 @@ +class GetFoo { + private @lombok.Getter int foo; + GetFoo() { + super(); + } + public @java.lang.SuppressWarnings("all") int getFoo() { + return this.foo; + } +} diff --git a/test/transform/resource/after-ecj/CleanupName.java b/test/transform/resource/after-ecj/CleanupName.java new file mode 100644 index 00000000..944a81e1 --- /dev/null +++ b/test/transform/resource/after-ecj/CleanupName.java @@ -0,0 +1,27 @@ +class CleanupName { + CleanupName() { + super(); + } + void test() { + @lombok.Cleanup("toString") Object o = "Hello World!"; + try + { + System.out.println(o); + } + finally + { + o.toString(); + } + } + void test2() { + @lombok.Cleanup(value = "toString") Object o = "Hello World too!"; + try + { + System.out.println(o); + } + finally + { + o.toString(); + } + } +}
\ No newline at end of file diff --git a/test/transform/resource/after-ecj/CleanupPlain.java b/test/transform/resource/after-ecj/CleanupPlain.java new file mode 100644 index 00000000..6754b4f6 --- /dev/null +++ b/test/transform/resource/after-ecj/CleanupPlain.java @@ -0,0 +1,29 @@ +import lombok.Cleanup; +import java.io.*; +class CleanupPlain { + CleanupPlain() { + super(); + } + void test() throws Exception { + @lombok.Cleanup InputStream in = new FileInputStream("in"); + try + { + @Cleanup OutputStream out = new FileOutputStream("out"); + try + { + if (in.markSupported()) + { + out.flush(); + } + } + finally + { + out.close(); + } + } + finally + { + in.close(); + } + } +}
\ No newline at end of file diff --git a/test/transform/resource/after-ecj/CommentsInterspersed.java b/test/transform/resource/after-ecj/CommentsInterspersed.java new file mode 100644 index 00000000..d708ad72 --- /dev/null +++ b/test/transform/resource/after-ecj/CommentsInterspersed.java @@ -0,0 +1,12 @@ +import lombok.Getter; +public class CommentsInterspersed { + private int x; + private @Getter String test = "foo"; + public CommentsInterspersed() { + super(); + } + public native void gwtTest(); + public @java.lang.SuppressWarnings("all") String getTest() { + return this.test; + } +} diff --git a/test/transform/resource/after-ecj/DataExtended.java b/test/transform/resource/after-ecj/DataExtended.java new file mode 100644 index 00000000..b7be8bcf --- /dev/null +++ b/test/transform/resource/after-ecj/DataExtended.java @@ -0,0 +1,33 @@ +@lombok.Data @lombok.ToString(doNotUseGetters = true) class DataExtended { + int x; + public @java.lang.SuppressWarnings("all") DataExtended() { + super(); + } + public @java.lang.SuppressWarnings("all") int getX() { + return this.x; + } + public @java.lang.SuppressWarnings("all") void setX(final int x) { + this.x = x; + } + public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) { + if ((o == this)) + return true; + if ((o == null)) + return false; + if ((o.getClass() != this.getClass())) + return false; + final DataExtended other = (DataExtended) o; + if ((this.getX() != other.getX())) + return false; + return true; + } + public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() { + final int PRIME = 31; + int result = 1; + result = ((result * PRIME) + this.getX()); + return result; + } + public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { + return (("DataExtended(x=" + this.x) + ")"); + } +} diff --git a/test/transform/resource/after-ecj/DataIgnore.java b/test/transform/resource/after-ecj/DataIgnore.java new file mode 100644 index 00000000..df2254c8 --- /dev/null +++ b/test/transform/resource/after-ecj/DataIgnore.java @@ -0,0 +1,32 @@ +@lombok.Data class DataIgnore { + final int x; + String $name; + public @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") DataIgnore(final int x) { + super(); + this.x = x; + } + public @java.lang.SuppressWarnings("all") int getX() { + return this.x; + } + public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) { + if ((o == this)) + return true; + if ((o == null)) + return false; + if ((o.getClass() != this.getClass())) + return false; + final DataIgnore other = (DataIgnore) o; + if ((this.getX() != other.getX())) + return false; + return true; + } + public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() { + final int PRIME = 31; + int result = 1; + result = ((result * PRIME) + this.getX()); + return result; + } + public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { + return (("DataIgnore(x=" + this.getX()) + ")"); + } +} diff --git a/test/transform/resource/after-ecj/DataPlain.java b/test/transform/resource/after-ecj/DataPlain.java new file mode 100644 index 00000000..b6e385f3 --- /dev/null +++ b/test/transform/resource/after-ecj/DataPlain.java @@ -0,0 +1,83 @@ +import lombok.Data; +@lombok.Data class Data1 { + final int x; + String name; + public @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") Data1(final int x) { + super(); + this.x = x; + } + public @java.lang.SuppressWarnings("all") int getX() { + return this.x; + } + public @java.lang.SuppressWarnings("all") String getName() { + return this.name; + } + public @java.lang.SuppressWarnings("all") void setName(final String name) { + this.name = name; + } + public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) { + if ((o == this)) + return true; + if ((o == null)) + return false; + if ((o.getClass() != this.getClass())) + return false; + final Data1 other = (Data1) o; + if ((this.getX() != other.getX())) + return false; + if (((this.getName() == null) ? (other.getName() != null) : (! this.getName().equals(other.getName())))) + return false; + return true; + } + public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() { + final int PRIME = 31; + int result = 1; + result = ((result * PRIME) + this.getX()); + result = ((result * PRIME) + ((this.getName() == null) ? 0 : this.getName().hashCode())); + return result; + } + public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { + return (((("Data1(x=" + this.getX()) + ", name=") + this.getName()) + ")"); + } +} +@Data class Data2 { + final int x; + String name; + public @java.beans.ConstructorProperties({"x"}) @java.lang.SuppressWarnings("all") Data2(final int x) { + super(); + this.x = x; + } + public @java.lang.SuppressWarnings("all") int getX() { + return this.x; + } + public @java.lang.SuppressWarnings("all") String getName() { + return this.name; + } + public @java.lang.SuppressWarnings("all") void setName(final String name) { + this.name = name; + } + public @java.lang.Override @java.lang.SuppressWarnings("all") boolean equals(final java.lang.Object o) { + if ((o == this)) + return true; + if ((o == null)) + return false; + if ((o.getClass() != this.getClass())) + return false; + final Data2 other = (Data2) o; + if ((this.getX() != other.getX())) + return false; + if (((this.getName() == null) ? (other.getName() != null) : (! this.getName().equals(other.getName())))) + return false; + return true; + } + public @java.lang.Override @java.lang.SuppressWarnings("all") int hashCode() { + final int PRIME = 31; + int result = 1; + result = ((result * PRIME) + this.getX()); + result = ((result * PRIME) + ((this.getName() == null) ? 0 : this.getName().hashCode())); + return result; + } + public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { + return (((("Data2(x=" + this.getX()) + ", name=") + this.getName()) + ")"); + } +} diff --git a/test/transform/resource/after-ecj/GetterAccessLevel.java b/test/transform/resource/after-ecj/GetterAccessLevel.java new file mode 100644 index 00000000..14edfb56 --- /dev/null +++ b/test/transform/resource/after-ecj/GetterAccessLevel.java @@ -0,0 +1,43 @@ +class GetterAccessLevel { + @lombok.Getter(lombok.AccessLevel.NONE) boolean isNone; + @lombok.Getter(lombok.AccessLevel.PRIVATE) boolean isPrivate; + @lombok.Getter(lombok.AccessLevel.PACKAGE) boolean isPackage; + @lombok.Getter(lombok.AccessLevel.PROTECTED) boolean isProtected; + @lombok.Getter(lombok.AccessLevel.PUBLIC) boolean isPublic; + @lombok.Getter(lombok.AccessLevel.NONE) String noneString; + @lombok.Getter(lombok.AccessLevel.PRIVATE) String privateString; + @lombok.Getter(lombok.AccessLevel.PACKAGE) String packageString; + @lombok.Getter(lombok.AccessLevel.PROTECTED) String protectedString; + @lombok.Getter(lombok.AccessLevel.PUBLIC) String publicString; + @lombok.Getter(value = lombok.AccessLevel.PUBLIC) String value; + GetterAccessLevel() { + super(); + } + private @java.lang.SuppressWarnings("all") boolean isPrivate() { + return this.isPrivate; + } + @java.lang.SuppressWarnings("all") boolean isPackage() { + return this.isPackage; + } + protected @java.lang.SuppressWarnings("all") boolean isProtected() { + return this.isProtected; + } + public @java.lang.SuppressWarnings("all") boolean isPublic() { + return this.isPublic; + } + private @java.lang.SuppressWarnings("all") String getPrivateString() { + return this.privateString; + } + @java.lang.SuppressWarnings("all") String getPackageString() { + return this.packageString; + } + protected @java.lang.SuppressWarnings("all") String getProtectedString() { + return this.protectedString; + } + public @java.lang.SuppressWarnings("all") String getPublicString() { + return this.publicString; + } + public @java.lang.SuppressWarnings("all") String getValue() { + return this.value; + } +} diff --git a/test/transform/resource/after-ecj/GetterAlreadyExists.java b/test/transform/resource/after-ecj/GetterAlreadyExists.java new file mode 100644 index 00000000..959b6a64 --- /dev/null +++ b/test/transform/resource/after-ecj/GetterAlreadyExists.java @@ -0,0 +1,186 @@ +class Getter1 { + @lombok.Getter boolean foo; + Getter1() { + super(); + } + boolean hasFoo() { + return true; + } +} +class Getter2 { + @lombok.Getter boolean foo; + Getter2() { + super(); + } + boolean isFoo() { + return true; + } +} +class Getter3 { + @lombok.Getter boolean foo; + Getter3() { + super(); + } + boolean getFoo() { + return true; + } +} +class Getter4 { + @lombok.Getter String foo; + Getter4() { + super(); + } + String hasFoo() { + return null; + } + public @java.lang.SuppressWarnings("all") String getFoo() { + return this.foo; + } +} +class Getter5 { + @lombok.Getter String foo; + Getter5() { + super(); + } + String isFoo() { + return null; + } + public @java.lang.SuppressWarnings("all") String getFoo() { + return this.foo; + } +} +class Getter6 { + @lombok.Getter String foo; + Getter6() { + super(); + } + String getFoo() { + return null; + } +} +class Getter7 { + @lombok.Getter String foo; + Getter7() { + super(); + } + boolean hasFoo() { + return false; + } + public @java.lang.SuppressWarnings("all") String getFoo() { + return this.foo; + } +} +class Getter8 { + @lombok.Getter String foo; + Getter8() { + super(); + } + boolean isFoo() { + return false; + } + public @java.lang.SuppressWarnings("all") String getFoo() { + return this.foo; + } +} +class Getter9 { + @lombok.Getter String foo; + Getter9() { + super(); + } + boolean getFoo() { + return false; + } +} +class Getter10 { + @lombok.Getter boolean foo; + Getter10() { + super(); + } + static boolean hasFoo() { + return false; + } +} +class Getter11 { + @lombok.Getter boolean foo; + Getter11() { + super(); + } + static boolean isFoo() { + return false; + } +} +class Getter12 { + @lombok.Getter boolean foo; + Getter12() { + super(); + } + static boolean getFoo() { + return false; + } +} +class Getter13 { + @lombok.Getter String foo; + Getter13() { + super(); + } + static boolean hasFoo() { + return false; + } + public @java.lang.SuppressWarnings("all") String getFoo() { + return this.foo; + } +} +class Getter14 { + @lombok.Getter String foo; + Getter14() { + super(); + } + static boolean isFoo() { + return false; + } + public @java.lang.SuppressWarnings("all") String getFoo() { + return this.foo; + } +} +class Getter15 { + @lombok.Getter String foo; + Getter15() { + super(); + } + static boolean getFoo() { + return false; + } +} +class Getter16 { + @lombok.Getter String foo; + Getter16() { + super(); + } + static String hasFoo() { + return false; + } + public @java.lang.SuppressWarnings("all") String getFoo() { + return this.foo; + } +} +class Getter17 { + @lombok.Getter String foo; + Getter17() { + super(); + } + static String isFoo() { + return false; + } + public @java.lang.SuppressWarnings("all") String getFoo() { + return this.foo; + } +} +class Getter18 { + @lombok.Getter String foo; + Getter18() { + super(); + } + static String getFoo() { + return false; + } +} diff --git a/test/transform/resource/after-ecj/GetterBoolean.java b/test/transform/resource/after-ecj/GetterBoolean.java new file mode 100644 index 00000000..caf758c1 --- /dev/null +++ b/test/transform/resource/after-ecj/GetterBoolean.java @@ -0,0 +1,26 @@ +class Getter { + @lombok.Getter boolean foo; + @lombok.Getter boolean isBar; + @lombok.Getter boolean hasBaz; + Getter() { + super(); + } + public @java.lang.SuppressWarnings("all") boolean isFoo() { + return this.foo; + } + public @java.lang.SuppressWarnings("all") boolean isBar() { + return this.isBar; + } + public @java.lang.SuppressWarnings("all") boolean hasBaz() { + return this.hasBaz; + } +} +class MoreGetter { + @lombok.Getter boolean foo; + MoreGetter() { + super(); + } + boolean hasFoo() { + return true; + } +} diff --git a/test/transform/resource/after-ecj/GetterOnClass.java b/test/transform/resource/after-ecj/GetterOnClass.java new file mode 100644 index 00000000..7668c9d3 --- /dev/null +++ b/test/transform/resource/after-ecj/GetterOnClass.java @@ -0,0 +1,67 @@ +@lombok.Getter class GetterOnClass1 { + @lombok.Getter(lombok.AccessLevel.NONE) boolean isNone; + boolean isPublic; + GetterOnClass1() { + super(); + } + public @java.lang.SuppressWarnings("all") boolean isPublic() { + return this.isPublic; + } +} +@lombok.Getter(lombok.AccessLevel.PROTECTED) class GetterOnClass2 { + @lombok.Getter(lombok.AccessLevel.NONE) boolean isNone; + boolean isProtected; + @lombok.Getter(lombok.AccessLevel.PACKAGE) boolean isPackage; + GetterOnClass2() { + super(); + } + @java.lang.SuppressWarnings("all") boolean isPackage() { + return this.isPackage; + } + protected @java.lang.SuppressWarnings("all") boolean isProtected() { + return this.isProtected; + } +} +@lombok.Getter(lombok.AccessLevel.PACKAGE) class GetterOnClass3 { + @lombok.Getter(lombok.AccessLevel.NONE) boolean isNone; + boolean isPackage; + GetterOnClass3() { + super(); + } + @java.lang.SuppressWarnings("all") boolean isPackage() { + return this.isPackage; + } +} +@lombok.Getter(lombok.AccessLevel.PRIVATE) class GetterOnClass4 { + @lombok.Getter(lombok.AccessLevel.NONE) boolean isNone; + boolean isPrivate; + GetterOnClass4() { + super(); + } + private @java.lang.SuppressWarnings("all") boolean isPrivate() { + return this.isPrivate; + } +} +@lombok.Getter(lombok.AccessLevel.PUBLIC) class GetterOnClass5 { + @lombok.Getter(lombok.AccessLevel.NONE) boolean isNone; + boolean isPublic; + GetterOnClass5() { + super(); + } + public @java.lang.SuppressWarnings("all") boolean isPublic() { + return this.isPublic; + } +} +@lombok.Getter class GetterOnClass6 { + String couldBeNull; + @lombok.NonNull String nonNull; + GetterOnClass6() { + super(); + } + public @java.lang.SuppressWarnings("all") String getCouldBeNull() { + return this.couldBeNull; + } + public @lombok.NonNull @java.lang.SuppressWarnings("all") String getNonNull() { + return this.nonNull; + } +} diff --git a/test/transform/resource/after-ecj/GetterPlain.java b/test/transform/resource/after-ecj/GetterPlain.java new file mode 100644 index 00000000..19e24c77 --- /dev/null +++ b/test/transform/resource/after-ecj/GetterPlain.java @@ -0,0 +1,14 @@ +import lombok.Getter; +class GetterPlain { + @lombok.Getter int i; + @Getter int foo; + GetterPlain() { + super(); + } + public @java.lang.SuppressWarnings("all") int getI() { + return this.i; + } + public @java.lang.SuppressWarnings("all") int getFoo() { + return this.foo; + } +}
\ No newline at end of file diff --git a/test/transform/resource/after-ecj/GetterWithDollar.java b/test/transform/resource/after-ecj/GetterWithDollar.java new file mode 100644 index 00000000..f4bc799c --- /dev/null +++ b/test/transform/resource/after-ecj/GetterWithDollar.java @@ -0,0 +1,22 @@ +class GetterWithDollar1 { + @lombok.Getter int $i; + GetterWithDollar1() { + super(); + } + public @java.lang.SuppressWarnings("all") int get$i() { + return this.$i; + } +} +class GetterWithDollar2 { + @lombok.Getter int $i; + @lombok.Getter int i; + GetterWithDollar2() { + super(); + } + public @java.lang.SuppressWarnings("all") int get$i() { + return this.$i; + } + public @java.lang.SuppressWarnings("all") int getI() { + return this.i; + } +} diff --git a/test/transform/resource/after-ecj/NonNullPlain.java b/test/transform/resource/after-ecj/NonNullPlain.java new file mode 100644 index 00000000..877f97ae --- /dev/null +++ b/test/transform/resource/after-ecj/NonNullPlain.java @@ -0,0 +1,21 @@ +class NonNullPlain { + @lombok.Setter @lombok.NonNull @lombok.Getter int i; + @lombok.Getter @lombok.Setter @lombok.NonNull String s; + NonNullPlain() { + super(); + } + public @java.lang.SuppressWarnings("all") void setI(final @lombok.NonNull int i) { + this.i = i; + } + public @lombok.NonNull @java.lang.SuppressWarnings("all") int getI() { + return this.i; + } + public @lombok.NonNull @java.lang.SuppressWarnings("all") String getS() { + return this.s; + } + public @java.lang.SuppressWarnings("all") void setS(final @lombok.NonNull String s) { + if ((s == null)) + throw new java.lang.NullPointerException("s"); + this.s = s; + } +}
\ No newline at end of file diff --git a/test/transform/resource/after-ecj/SetterAccessLevel.java b/test/transform/resource/after-ecj/SetterAccessLevel.java new file mode 100644 index 00000000..20eb9d2c --- /dev/null +++ b/test/transform/resource/after-ecj/SetterAccessLevel.java @@ -0,0 +1,26 @@ +class SetterAccessLevel { + @lombok.Setter(lombok.AccessLevel.NONE) boolean isNone; + @lombok.Setter(lombok.AccessLevel.PRIVATE) boolean isPrivate; + @lombok.Setter(lombok.AccessLevel.PACKAGE) boolean isPackage; + @lombok.Setter(lombok.AccessLevel.PROTECTED) boolean isProtected; + @lombok.Setter(lombok.AccessLevel.PUBLIC) boolean isPublic; + @lombok.Setter(value = lombok.AccessLevel.PUBLIC) boolean value; + SetterAccessLevel() { + super(); + } + private @java.lang.SuppressWarnings("all") void setIsPrivate(final boolean isPrivate) { + this.isPrivate = isPrivate; + } + @java.lang.SuppressWarnings("all") void setIsPackage(final boolean isPackage) { + this.isPackage = isPackage; + } + protected @java.lang.SuppressWarnings("all") void setIsProtected(final boolean isProtected) { + this.isProtected = isProtected; + } + public @java.lang.SuppressWarnings("all") void setIsPublic(final boolean isPublic) { + this.isPublic = isPublic; + } + public @java.lang.SuppressWarnings("all") void setValue(final boolean value) { + this.value = value; + } +} diff --git a/test/transform/resource/after-ecj/SetterAlreadyExists.java b/test/transform/resource/after-ecj/SetterAlreadyExists.java new file mode 100644 index 00000000..a1de2156 --- /dev/null +++ b/test/transform/resource/after-ecj/SetterAlreadyExists.java @@ -0,0 +1,56 @@ +class Setter1 { + @lombok.Setter boolean foo; + Setter1() { + super(); + } + void setFoo(boolean foo) { + } +} +class Setter2 { + @lombok.Setter boolean foo; + Setter2() { + super(); + } + void setFoo(String foo) { + } +} +class Setter3 { + @lombok.Setter String foo; + Setter3() { + super(); + } + void setFoo(boolean foo) { + } +} +class Setter4 { + @lombok.Setter String foo; + Setter4() { + super(); + } + void setFoo(String foo) { + } +} +class Setter5 { + @lombok.Setter String foo; + Setter5() { + super(); + } + void setFoo() { + } +} +class Setter6 { + @lombok.Setter String foo; + Setter6() { + super(); + } + void setFoo(String foo, int x) { + } +} +class Setter7 { + @lombok.Setter String foo; + Setter7() { + super(); + } + static void setFoo() { + } +}
\ No newline at end of file diff --git a/test/transform/resource/after-ecj/SetterOnClass.java b/test/transform/resource/after-ecj/SetterOnClass.java new file mode 100644 index 00000000..e92e217c --- /dev/null +++ b/test/transform/resource/after-ecj/SetterOnClass.java @@ -0,0 +1,69 @@ +@lombok.Setter class SetterOnClass1 { + @lombok.Setter(lombok.AccessLevel.NONE) boolean isNone; + boolean isPublic; + SetterOnClass1() { + super(); + } + public @java.lang.SuppressWarnings("all") void setIsPublic(final boolean isPublic) { + this.isPublic = isPublic; + } +} +@lombok.Setter(lombok.AccessLevel.PROTECTED) class SetterOnClass2 { + @lombok.Setter(lombok.AccessLevel.NONE) boolean isNone; + boolean isProtected; + @lombok.Setter(lombok.AccessLevel.PACKAGE) boolean isPackage; + SetterOnClass2() { + super(); + } + @java.lang.SuppressWarnings("all") void setIsPackage(final boolean isPackage) { + this.isPackage = isPackage; + } + protected @java.lang.SuppressWarnings("all") void setIsProtected(final boolean isProtected) { + this.isProtected = isProtected; + } +} +@lombok.Setter(lombok.AccessLevel.PACKAGE) class SetterOnClass3 { + @lombok.Setter(lombok.AccessLevel.NONE) boolean isNone; + boolean isPackage; + SetterOnClass3() { + super(); + } + @java.lang.SuppressWarnings("all") void setIsPackage(final boolean isPackage) { + this.isPackage = isPackage; + } +} +@lombok.Setter(lombok.AccessLevel.PRIVATE) class SetterOnClass4 { + @lombok.Setter(lombok.AccessLevel.NONE) boolean isNone; + boolean isPrivate; + SetterOnClass4() { + super(); + } + private @java.lang.SuppressWarnings("all") void setIsPrivate(final boolean isPrivate) { + this.isPrivate = isPrivate; + } +} +@lombok.Setter(lombok.AccessLevel.PUBLIC) class SetterOnClass5 { + @lombok.Setter(lombok.AccessLevel.NONE) boolean isNone; + boolean isPublic; + SetterOnClass5() { + super(); + } + public @java.lang.SuppressWarnings("all") void setIsPublic(final boolean isPublic) { + this.isPublic = isPublic; + } +} +@lombok.Setter class SetterOnClass6 { + String couldBeNull; + @lombok.NonNull String nonNull; + SetterOnClass6() { + super(); + } + public @java.lang.SuppressWarnings("all") void setCouldBeNull(final String couldBeNull) { + this.couldBeNull = couldBeNull; + } + public @java.lang.SuppressWarnings("all") void setNonNull(final @lombok.NonNull String nonNull) { + if ((nonNull == null)) + throw new java.lang.NullPointerException("nonNull"); + this.nonNull = nonNull; + } +} diff --git a/test/transform/resource/after-ecj/SetterPlain.java b/test/transform/resource/after-ecj/SetterPlain.java new file mode 100644 index 00000000..7f0a4a81 --- /dev/null +++ b/test/transform/resource/after-ecj/SetterPlain.java @@ -0,0 +1,14 @@ +import lombok.Setter; +class SetterPlain { + @lombok.Setter int i; + @Setter int foo; + SetterPlain() { + super(); + } + public @java.lang.SuppressWarnings("all") void setI(final int i) { + this.i = i; + } + public @java.lang.SuppressWarnings("all") void setFoo(final int foo) { + this.foo = foo; + } +}
\ No newline at end of file diff --git a/test/transform/resource/after-ecj/SetterWithDollar.java b/test/transform/resource/after-ecj/SetterWithDollar.java new file mode 100644 index 00000000..c5bc14f1 --- /dev/null +++ b/test/transform/resource/after-ecj/SetterWithDollar.java @@ -0,0 +1,22 @@ +class SetterWithDollar1 { + @lombok.Setter int $i; + SetterWithDollar1() { + super(); + } + public @java.lang.SuppressWarnings("all") void set$i(final int $i) { + this.$i = $i; + } +} +class SetterWithDollar2 { + @lombok.Setter int $i; + @lombok.Setter int i; + SetterWithDollar2() { + super(); + } + public @java.lang.SuppressWarnings("all") void set$i(final int $i) { + this.$i = $i; + } + public @java.lang.SuppressWarnings("all") void setI(final int i) { + this.i = i; + } +} diff --git a/test/transform/resource/after-ecj/SneakyThrowsMultiple.java b/test/transform/resource/after-ecj/SneakyThrowsMultiple.java new file mode 100644 index 00000000..82eda411 --- /dev/null +++ b/test/transform/resource/after-ecj/SneakyThrowsMultiple.java @@ -0,0 +1,63 @@ +import java.awt.AWTException; +import java.io.IOException; +import java.util.Random; +class SneakyThrowsMultiple { + SneakyThrowsMultiple() { + super(); + } + public @lombok.SneakyThrows({IOException.class, Throwable.class}) void test() { + try + { + try + { + System.out.println("test1"); + throw new IOException(); + } + catch (final IOException $ex) { + throw lombok.Lombok.sneakyThrow($ex); + } + } + catch (final Throwable $ex) { + throw lombok.Lombok.sneakyThrow($ex); + } + } + public @lombok.SneakyThrows({AWTException.class, IOException.class}) void test2() { + try + { + try + { + System.out.println("test2"); + if (new Random().nextBoolean()) + { + throw new IOException(); + } + else + { + throw new AWTException("WHAT"); + } + } + catch (final AWTException $ex) { + throw lombok.Lombok.sneakyThrow($ex); + } + } + catch (final IOException $ex) { + throw lombok.Lombok.sneakyThrow($ex); + } + } + public @lombok.SneakyThrows(value = {IOException.class, Throwable.class}) void test3() { + try + { + try + { + System.out.println("test3"); + throw new IOException(); + } + catch (final IOException $ex) { + throw lombok.Lombok.sneakyThrow($ex); + } + } + catch (final Throwable $ex) { + throw lombok.Lombok.sneakyThrow($ex); + } + } +}
\ No newline at end of file diff --git a/test/transform/resource/after-ecj/SneakyThrowsPlain.java b/test/transform/resource/after-ecj/SneakyThrowsPlain.java new file mode 100644 index 00000000..6e75a75c --- /dev/null +++ b/test/transform/resource/after-ecj/SneakyThrowsPlain.java @@ -0,0 +1,24 @@ +import lombok.SneakyThrows; +class SneakyThrowsPlain { + SneakyThrowsPlain() { + super(); + } + public @lombok.SneakyThrows void test() { + try + { + System.out.println("test1"); + } + catch (final java.lang.Throwable $ex) { + throw lombok.Lombok.sneakyThrow($ex); + } + } + public @SneakyThrows void test2() { + try + { + System.out.println("test2"); + } + catch (final java.lang.Throwable $ex) { + throw lombok.Lombok.sneakyThrow($ex); + } + } +} diff --git a/test/transform/resource/after-ecj/SneakyThrowsSingle.java b/test/transform/resource/after-ecj/SneakyThrowsSingle.java new file mode 100644 index 00000000..eea593f2 --- /dev/null +++ b/test/transform/resource/after-ecj/SneakyThrowsSingle.java @@ -0,0 +1,35 @@ +import java.io.IOException; +class SneakyThrowsSingle { + SneakyThrowsSingle() { + super(); + } + public @lombok.SneakyThrows(Throwable.class) void test() { + try + { + System.out.println("test1"); + } + catch (final Throwable $ex) { + throw lombok.Lombok.sneakyThrow($ex); + } + } + public @lombok.SneakyThrows(IOException.class) void test2() { + try + { + System.out.println("test2"); + throw new IOException(); + } + catch (final IOException $ex) { + throw lombok.Lombok.sneakyThrow($ex); + } + } + public @lombok.SneakyThrows(value = IOException.class) void test3() { + try + { + System.out.println("test3"); + throw new IOException(); + } + catch (final IOException $ex) { + throw lombok.Lombok.sneakyThrow($ex); + } + } +} diff --git a/test/transform/resource/after-ecj/SynchronizedName.java b/test/transform/resource/after-ecj/SynchronizedName.java new file mode 100644 index 00000000..a7edd3e7 --- /dev/null +++ b/test/transform/resource/after-ecj/SynchronizedName.java @@ -0,0 +1,36 @@ +class SynchronizedName { + private Object read = new Object(); + private static Object READ = new Object(); + <clinit>() { + } + SynchronizedName() { + super(); + } + @lombok.Synchronized("read") void test1() { + synchronized (this.read) + { + System.out.println("one"); + } + } + @lombok.Synchronized("write") void test2() { + System.out.println("two"); + } + static @lombok.Synchronized("read") void test3() { + synchronized (SynchronizedName.read) + { + System.out.println("three"); + } + } + @lombok.Synchronized("READ") void test4() { + synchronized (this.READ) + { + System.out.println("four"); + } + } + @lombok.Synchronized(value = "read") void test5() { + synchronized (this.read) + { + System.out.println("five"); + } + } +}
\ No newline at end of file diff --git a/test/transform/resource/after-ecj/SynchronizedPlain.java b/test/transform/resource/after-ecj/SynchronizedPlain.java new file mode 100644 index 00000000..b9f032c5 --- /dev/null +++ b/test/transform/resource/after-ecj/SynchronizedPlain.java @@ -0,0 +1,37 @@ +import lombok.Synchronized; +class SynchronizedPlain1 { + private final @java.lang.SuppressWarnings("all") java.lang.Object $lock = new java.lang.Object[0]; + SynchronizedPlain1() { + super(); + } + @lombok.Synchronized void test() { + synchronized (this.$lock) + { + System.out.println("one"); + } + } + @Synchronized void test2() { + synchronized (this.$lock) + { + System.out.println("two"); + } + } +} +class SynchronizedPlain2 { + private static final @java.lang.SuppressWarnings("all") java.lang.Object $LOCK = new java.lang.Object[0]; + SynchronizedPlain2() { + super(); + } + static @lombok.Synchronized void test() { + synchronized (SynchronizedPlain2.$LOCK) + { + System.out.println("three"); + } + } + static @Synchronized void test2() { + synchronized (SynchronizedPlain2.$LOCK) + { + System.out.println("four"); + } + } +} diff --git a/test/transform/resource/after-ecj/ToStringInner.java b/test/transform/resource/after-ecj/ToStringInner.java new file mode 100644 index 00000000..3970cdc4 --- /dev/null +++ b/test/transform/resource/after-ecj/ToStringInner.java @@ -0,0 +1,43 @@ +import lombok.ToString; +@ToString class ToStringOuter { + @ToString class ToStringInner { + final int y; + ToStringInner() { + super(); + } + public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { + return (("ToStringInner(y=" + this.y) + ")"); + } + } + static @ToString class ToStringStaticInner { + final int y; + ToStringStaticInner() { + super(); + } + public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { + return (("ToStringStaticInner(y=" + this.y) + ")"); + } + } + class ToStringMiddle { + @ToString class ToStringMoreInner { + final String name; + ToStringMoreInner() { + super(); + } + public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { + return (("ToStringMoreInner(name=" + this.name) + ")"); + } + } + ToStringMiddle() { + super(); + } + } + final int x; + String name; + ToStringOuter() { + super(); + } + public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { + return (((("ToStringOuter(x=" + this.x) + ", name=") + this.name) + ")"); + } +} diff --git a/test/transform/resource/after-ecj/ToStringPlain.java b/test/transform/resource/after-ecj/ToStringPlain.java new file mode 100644 index 00000000..7196abb9 --- /dev/null +++ b/test/transform/resource/after-ecj/ToStringPlain.java @@ -0,0 +1,21 @@ +import lombok.ToString; +@lombok.ToString class ToString1 { + final int x; + String name; + ToString1() { + super(); + } + public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { + return (((("ToString1(x=" + this.x) + ", name=") + this.name) + ")"); + } +} +@ToString class ToString2 { + final int x; + String name; + ToString2() { + super(); + } + public @java.lang.Override @java.lang.SuppressWarnings("all") java.lang.String toString() { + return (((("ToString2(x=" + this.x) + ", name=") + this.name) + ")"); + } +} |