aboutsummaryrefslogtreecommitdiff
path: root/test/lombok/resource/after
diff options
context:
space:
mode:
Diffstat (limited to 'test/lombok/resource/after')
-rw-r--r--test/lombok/resource/after/CleanupName.java10
-rw-r--r--test/lombok/resource/after/CleanupPlain.java18
-rw-r--r--test/lombok/resource/after/GetterAlreadyExists.java66
-rw-r--r--test/lombok/resource/after/NonNullPlain.java25
-rw-r--r--test/lombok/resource/after/SetterAccessLevel.java19
-rw-r--r--test/lombok/resource/after/SetterAlreadyExists.java35
-rw-r--r--test/lombok/resource/after/SetterPlain.java10
7 files changed, 183 insertions, 0 deletions
diff --git a/test/lombok/resource/after/CleanupName.java b/test/lombok/resource/after/CleanupName.java
new file mode 100644
index 00000000..26997372
--- /dev/null
+++ b/test/lombok/resource/after/CleanupName.java
@@ -0,0 +1,10 @@
+class Cleanup {
+ void test() throws Exception {
+ Object o = "Hello World!";
+ try {
+ System.out.println(o);
+ } finally {
+ o.toString();
+ }
+ }
+}
diff --git a/test/lombok/resource/after/CleanupPlain.java b/test/lombok/resource/after/CleanupPlain.java
new file mode 100644
index 00000000..25c66ced
--- /dev/null
+++ b/test/lombok/resource/after/CleanupPlain.java
@@ -0,0 +1,18 @@
+import java.io.*;
+class Cleanup {
+ void test() throws Exception {
+ InputStream in = new FileInputStream("in");
+ try {
+ OutputStream out = new FileOutputStream("out");
+ try {
+ if (in.markSupported()) {
+ out.flush();
+ }
+ } finally {
+ out.close();
+ }
+ } finally {
+ in.close();
+ }
+ }
+}
diff --git a/test/lombok/resource/after/GetterAlreadyExists.java b/test/lombok/resource/after/GetterAlreadyExists.java
index 152cb372..fce1ba41 100644
--- a/test/lombok/resource/after/GetterAlreadyExists.java
+++ b/test/lombok/resource/after/GetterAlreadyExists.java
@@ -63,4 +63,70 @@ class Getter9 {
boolean getFoo() {
return false;
}
+}
+class Getter10 {
+ boolean foo;
+ static boolean hasFoo() {
+ return false;
+ }
+}
+class Getter11 {
+ boolean foo;
+ static boolean isFoo() {
+ return false;
+ }
+}
+class Getter12 {
+ boolean foo;
+ static boolean getFoo() {
+ return false;
+ }
+}
+class Getter13 {
+ String foo;
+ static boolean hasFoo() {
+ return false;
+ }
+ public String getFoo() {
+ return foo;
+ }
+}
+class Getter14 {
+ String foo;
+ static boolean isFoo() {
+ return false;
+ }
+ public String getFoo() {
+ return foo;
+ }
+}
+class Getter15 {
+ String foo;
+ static boolean getFoo() {
+ return false;
+ }
+}
+class Getter16 {
+ String foo;
+ static String hasFoo() {
+ return false;
+ }
+ public String getFoo() {
+ return foo;
+ }
+}
+class Getter17 {
+ String foo;
+ static String isFoo() {
+ return false;
+ }
+ public String getFoo() {
+ return foo;
+ }
+}
+class Getter18 {
+ String foo;
+ static String getFoo() {
+ return false;
+ }
} \ No newline at end of file
diff --git a/test/lombok/resource/after/NonNullPlain.java b/test/lombok/resource/after/NonNullPlain.java
new file mode 100644
index 00000000..2d7ebb4f
--- /dev/null
+++ b/test/lombok/resource/after/NonNullPlain.java
@@ -0,0 +1,25 @@
+class NonNullPlain {
+ @lombok.NonNull
+ int i;
+ @lombok.NonNull
+ String s;
+
+ @lombok.NonNull
+ public int getI() {
+ return i;
+ }
+
+ public void setI(@lombok.NonNull final int i) {
+ this.i = i;
+ }
+
+ @lombok.NonNull
+ public String getS() {
+ return s;
+ }
+
+ public void setS(@lombok.NonNull final String s) {
+ if (s == null) throw new java.lang.NullPointerException("s");
+ this.s = s;
+ }
+}
diff --git a/test/lombok/resource/after/SetterAccessLevel.java b/test/lombok/resource/after/SetterAccessLevel.java
new file mode 100644
index 00000000..95179bac
--- /dev/null
+++ b/test/lombok/resource/after/SetterAccessLevel.java
@@ -0,0 +1,19 @@
+class Setter {
+ boolean isNone;
+ boolean isPrivate;
+ boolean isPackage;
+ boolean isProtected;
+ boolean isPublic;
+ private void setIsPrivate(final boolean isPrivate) {
+ this.isPrivate = isPrivate;
+ }
+ void setIsPackage(final boolean isPackage) {
+ this.isPackage = isPackage;
+ }
+ protected void setIsProtected(final boolean isProtected) {
+ this.isProtected = isProtected;
+ }
+ public void setIsPublic(final boolean isPublic) {
+ this.isPublic = isPublic;
+ }
+}
diff --git a/test/lombok/resource/after/SetterAlreadyExists.java b/test/lombok/resource/after/SetterAlreadyExists.java
new file mode 100644
index 00000000..e4992b29
--- /dev/null
+++ b/test/lombok/resource/after/SetterAlreadyExists.java
@@ -0,0 +1,35 @@
+class Setter1 {
+ boolean foo;
+ void setFoo(boolean foo) {
+ }
+}
+class Setter2 {
+ boolean foo;
+ void setFoo(String foo) {
+ }
+}
+class Setter3 {
+ String foo;
+ void setFoo(boolean foo) {
+ }
+}
+class Setter4 {
+ String foo;
+ void setFoo(String foo) {
+ }
+}
+class Setter5 {
+ String foo;
+ void setFoo() {
+ }
+}
+class Setter6 {
+ String foo;
+ void setFoo(String foo, int x) {
+ }
+}
+class Setter7 {
+ String foo;
+ static void setFoo() {
+ }
+}
diff --git a/test/lombok/resource/after/SetterPlain.java b/test/lombok/resource/after/SetterPlain.java
new file mode 100644
index 00000000..2570365c
--- /dev/null
+++ b/test/lombok/resource/after/SetterPlain.java
@@ -0,0 +1,10 @@
+class Setter {
+ int i;
+ int foo;
+ public void setI(final int i) {
+ this.i = i;
+ }
+ public void setFoo(final int foo) {
+ this.foo = foo;
+ }
+} \ No newline at end of file