diff options
Diffstat (limited to 'test/transform/resource/after-delombok')
4 files changed, 70 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/DelegateOnGetter.java b/test/transform/resource/after-delombok/DelegateOnGetter.java new file mode 100644 index 00000000..ee34018a --- /dev/null +++ b/test/transform/resource/after-delombok/DelegateOnGetter.java @@ -0,0 +1,35 @@ +class DelegateOnGetter { + private final java.util.concurrent.atomic.AtomicReference<java.util.concurrent.atomic.AtomicReference<Bar>> bar = new java.util.concurrent.atomic.AtomicReference<java.util.concurrent.atomic.AtomicReference<Bar>>(); + private interface Bar { + void setList(java.util.ArrayList<java.lang.String> list); + int getInt(); + } + @java.lang.SuppressWarnings("all") + public Bar getBar() { + java.util.concurrent.atomic.AtomicReference<Bar> value = this.bar.get(); + if (value == null) { + synchronized (this.bar) { + value = this.bar.get(); + if (value == null) { + value = new java.util.concurrent.atomic.AtomicReference<Bar>(new Bar(){ + public void setList(java.util.ArrayList<String> list) { + } + public int getInt() { + return 42; + } + }); + this.bar.set(value); + } + } + } + return value.get(); + } + @java.lang.SuppressWarnings("all") + public void setList(final java.util.ArrayList<java.lang.String> list) { + this.getBar().setList(list); + } + @java.lang.SuppressWarnings("all") + public int getInt() { + return this.getBar().getInt(); + } +}
\ No newline at end of file diff --git a/test/transform/resource/after-delombok/DelegateOnGetterNone.java b/test/transform/resource/after-delombok/DelegateOnGetterNone.java new file mode 100644 index 00000000..b3258f25 --- /dev/null +++ b/test/transform/resource/after-delombok/DelegateOnGetterNone.java @@ -0,0 +1,15 @@ +class DelegateOnGetterNone { + private final Bar bar; + private interface Bar { + void setList(java.util.ArrayList<java.lang.String> list); + int getInt(); + } + @java.lang.SuppressWarnings("all") + public void setList(final java.util.ArrayList<java.lang.String> list) { + this.bar.setList(list); + } + @java.lang.SuppressWarnings("all") + public int getInt() { + return this.bar.getInt(); + } +}
\ No newline at end of file diff --git a/test/transform/resource/after-delombok/DelegateOnMethods.java b/test/transform/resource/after-delombok/DelegateOnMethods.java new file mode 100644 index 00000000..b900f140 --- /dev/null +++ b/test/transform/resource/after-delombok/DelegateOnMethods.java @@ -0,0 +1,12 @@ +abstract class DelegateOnMethods { + public abstract Bar getBar(); + + public static interface Bar { + void bar(java.util.ArrayList<java.lang.String> list); + } + + @java.lang.SuppressWarnings("all") + public void bar(final java.util.ArrayList<java.lang.String> list) { + this.getBar().bar(list); + } +}
\ No newline at end of file diff --git a/test/transform/resource/after-delombok/GetterNone.java b/test/transform/resource/after-delombok/GetterNone.java new file mode 100644 index 00000000..11b4fd09 --- /dev/null +++ b/test/transform/resource/after-delombok/GetterNone.java @@ -0,0 +1,8 @@ +class GetterNone { + int i; + int foo; + @java.lang.SuppressWarnings("all") + public int getI() { + return this.i; + } +}
\ No newline at end of file |