aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-delombok
diff options
context:
space:
mode:
Diffstat (limited to 'test/transform/resource/after-delombok')
-rw-r--r--test/transform/resource/after-delombok/GetterLazy.java19
-rw-r--r--test/transform/resource/after-delombok/GetterLazyEahcToString.java44
-rw-r--r--test/transform/resource/after-delombok/GetterLazyInvalid.java22
-rw-r--r--test/transform/resource/after-delombok/GetterLazyNative.java124
4 files changed, 209 insertions, 0 deletions
diff --git a/test/transform/resource/after-delombok/GetterLazy.java b/test/transform/resource/after-delombok/GetterLazy.java
new file mode 100644
index 00000000..d7f97f0d
--- /dev/null
+++ b/test/transform/resource/after-delombok/GetterLazy.java
@@ -0,0 +1,19 @@
+class GetterLazy {
+ static class ValueType {
+ }
+ private final java.util.concurrent.atomic.AtomicReference<java.util.concurrent.atomic.AtomicReference<ValueType>> fieldName = new java.util.concurrent.atomic.AtomicReference<java.util.concurrent.atomic.AtomicReference<ValueType>>();
+ @java.lang.SuppressWarnings("all")
+ public ValueType getFieldName() {
+ java.util.concurrent.atomic.AtomicReference<ValueType> value = this.fieldName.get();
+ if (value == null) {
+ synchronized (this.fieldName) {
+ value = this.fieldName.get();
+ if (value == null) {
+ value = new java.util.concurrent.atomic.AtomicReference<ValueType>(new ValueType());
+ this.fieldName.set(value);
+ }
+ }
+ }
+ return value.get();
+ }
+}
diff --git a/test/transform/resource/after-delombok/GetterLazyEahcToString.java b/test/transform/resource/after-delombok/GetterLazyEahcToString.java
new file mode 100644
index 00000000..7d37e46b
--- /dev/null
+++ b/test/transform/resource/after-delombok/GetterLazyEahcToString.java
@@ -0,0 +1,44 @@
+class GetterLazyEahcToString {
+ private final java.util.concurrent.atomic.AtomicReference<java.util.concurrent.atomic.AtomicReference<String>> value = new java.util.concurrent.atomic.AtomicReference<java.util.concurrent.atomic.AtomicReference<String>>();
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ public boolean equals(final java.lang.Object o) {
+ if (o == this) return true;
+ if (!(o instanceof GetterLazyEahcToString)) return false;
+ final GetterLazyEahcToString other = (GetterLazyEahcToString)o;
+ if (!other.canEqual(this)) return false;
+ if (this.getValue() == null ? other.getValue() != null : !this.getValue().equals(other.getValue())) return false;
+ return true;
+ }
+ @java.lang.SuppressWarnings("all")
+ public boolean canEqual(final java.lang.Object other) {
+ return other instanceof GetterLazyEahcToString;
+ }
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ public int hashCode() {
+ final int PRIME = 31;
+ int result = 1;
+ result = result * PRIME + (this.getValue() == null ? 0 : this.getValue().hashCode());
+ return result;
+ }
+ @java.lang.Override
+ @java.lang.SuppressWarnings("all")
+ public java.lang.String toString() {
+ return "GetterLazyEahcToString(value=" + this.getValue() + ")";
+ }
+ @java.lang.SuppressWarnings("all")
+ public String getValue() {
+ java.util.concurrent.atomic.AtomicReference<String> value = this.value.get();
+ if (value == null) {
+ synchronized (this.value) {
+ value = this.value.get();
+ if (value == null) {
+ value = new java.util.concurrent.atomic.AtomicReference<String>("");
+ this.value.set(value);
+ }
+ }
+ }
+ return value.get();
+ }
+} \ No newline at end of file
diff --git a/test/transform/resource/after-delombok/GetterLazyInvalid.java b/test/transform/resource/after-delombok/GetterLazyInvalid.java
new file mode 100644
index 00000000..78cb7c2d
--- /dev/null
+++ b/test/transform/resource/after-delombok/GetterLazyInvalid.java
@@ -0,0 +1,22 @@
+class GetterLazyInvalidNotFinal {
+ private String fieldName = "";
+}
+class GetterLazyInvalidNotPrivate {
+ final String fieldName = "";
+}
+class GetterLazyInvalidNotPrivateFinal {
+ String fieldName = "";
+}
+class GetterLazyInvalidNone {
+ String fieldName = "";
+}
+class GetterLazyInvalidClass {
+ String fieldName = "";
+ @java.lang.SuppressWarnings("all")
+ public String getFieldName() {
+ return this.fieldName;
+ }
+}
+class GetterLazyInvalidNoInit {
+ String fieldName;
+} \ No newline at end of file
diff --git a/test/transform/resource/after-delombok/GetterLazyNative.java b/test/transform/resource/after-delombok/GetterLazyNative.java
new file mode 100644
index 00000000..ffa0824b
--- /dev/null
+++ b/test/transform/resource/after-delombok/GetterLazyNative.java
@@ -0,0 +1,124 @@
+class GetterLazyNative {
+
+ private final java.util.concurrent.atomic.AtomicReference<java.util.concurrent.atomic.AtomicReference<java.lang.Boolean>> booleanField = new java.util.concurrent.atomic.AtomicReference<java.util.concurrent.atomic.AtomicReference<java.lang.Boolean>>();
+ private final java.util.concurrent.atomic.AtomicReference<java.util.concurrent.atomic.AtomicReference<java.lang.Byte>> byteField = new java.util.concurrent.atomic.AtomicReference<java.util.concurrent.atomic.AtomicReference<java.lang.Byte>>();
+ private final java.util.concurrent.atomic.AtomicReference<java.util.concurrent.atomic.AtomicReference<java.lang.Short>> shortField = new java.util.concurrent.atomic.AtomicReference<java.util.concurrent.atomic.AtomicReference<java.lang.Short>>();
+ private final java.util.concurrent.atomic.AtomicReference<java.util.concurrent.atomic.AtomicReference<java.lang.Integer>> intField = new java.util.concurrent.atomic.AtomicReference<java.util.concurrent.atomic.AtomicReference<java.lang.Integer>>();
+ private final java.util.concurrent.atomic.AtomicReference<java.util.concurrent.atomic.AtomicReference<java.lang.Long>> longField = new java.util.concurrent.atomic.AtomicReference<java.util.concurrent.atomic.AtomicReference<java.lang.Long>>();
+ private final java.util.concurrent.atomic.AtomicReference<java.util.concurrent.atomic.AtomicReference<java.lang.Float>> floatField = new java.util.concurrent.atomic.AtomicReference<java.util.concurrent.atomic.AtomicReference<java.lang.Float>>();
+ private final java.util.concurrent.atomic.AtomicReference<java.util.concurrent.atomic.AtomicReference<java.lang.Double>> doubleField = new java.util.concurrent.atomic.AtomicReference<java.util.concurrent.atomic.AtomicReference<java.lang.Double>>();
+ private final java.util.concurrent.atomic.AtomicReference<java.util.concurrent.atomic.AtomicReference<java.lang.Character>> charField = new java.util.concurrent.atomic.AtomicReference<java.util.concurrent.atomic.AtomicReference<java.lang.Character>>();
+
+ @java.lang.SuppressWarnings("all")
+ public boolean getBooleanField() {
+ java.util.concurrent.atomic.AtomicReference<java.lang.Boolean> value = this.booleanField.get();
+ if (value == null) {
+ synchronized (this.booleanField) {
+ value = this.booleanField.get();
+ if (value == null) {
+ value = new java.util.concurrent.atomic.AtomicReference<java.lang.Boolean>(true);
+ this.booleanField.set(value);
+ }
+ }
+ }
+ return value.get();
+ }
+ @java.lang.SuppressWarnings("all")
+ public byte getByteField() {
+ java.util.concurrent.atomic.AtomicReference<java.lang.Byte> value = this.byteField.get();
+ if (value == null) {
+ synchronized (this.byteField) {
+ value = this.byteField.get();
+ if (value == null) {
+ value = new java.util.concurrent.atomic.AtomicReference<java.lang.Byte>(1);
+ this.byteField.set(value);
+ }
+ }
+ }
+ return value.get();
+ }
+ @java.lang.SuppressWarnings("all")
+ public short getShortField() {
+ java.util.concurrent.atomic.AtomicReference<java.lang.Short> value = this.shortField.get();
+ if (value == null) {
+ synchronized (this.shortField) {
+ value = this.shortField.get();
+ if (value == null) {
+ value = new java.util.concurrent.atomic.AtomicReference<java.lang.Short>(1);
+ this.shortField.set(value);
+ }
+ }
+ }
+ return value.get();
+ }
+ @java.lang.SuppressWarnings("all")
+ public int getIntField() {
+ java.util.concurrent.atomic.AtomicReference<java.lang.Integer> value = this.intField.get();
+ if (value == null) {
+ synchronized (this.intField) {
+ value = this.intField.get();
+ if (value == null) {
+ value = new java.util.concurrent.atomic.AtomicReference<java.lang.Integer>(1);
+ this.intField.set(value);
+ }
+ }
+ }
+ return value.get();
+ }
+ @java.lang.SuppressWarnings("all")
+ public long getLongField() {
+ java.util.concurrent.atomic.AtomicReference<java.lang.Long> value = this.longField.get();
+ if (value == null) {
+ synchronized (this.longField) {
+ value = this.longField.get();
+ if (value == null) {
+ value = new java.util.concurrent.atomic.AtomicReference<java.lang.Long>(1);
+ this.longField.set(value);
+ }
+ }
+ }
+ return value.get();
+ }
+ @java.lang.SuppressWarnings("all")
+ public float getFloatField() {
+ java.util.concurrent.atomic.AtomicReference<java.lang.Float> value = this.floatField.get();
+ if (value == null) {
+ synchronized (this.floatField) {
+ value = this.floatField.get();
+ if (value == null) {
+ value = new java.util.concurrent.atomic.AtomicReference<java.lang.Float>(1.0F);
+ this.floatField.set(value);
+ }
+ }
+ }
+ return value.get();
+ }
+ @java.lang.SuppressWarnings("all")
+ public double getDoubleField() {
+ java.util.concurrent.atomic.AtomicReference<java.lang.Double> value = this.doubleField.get();
+ if (value == null) {
+ synchronized (this.doubleField) {
+ value = this.doubleField.get();
+ if (value == null) {
+ value = new java.util.concurrent.atomic.AtomicReference<java.lang.Double>(1.0);
+ this.doubleField.set(value);
+ }
+ }
+ }
+ return value.get();
+ }
+ @java.lang.SuppressWarnings("all")
+ public char getCharField() {
+ java.util.concurrent.atomic.AtomicReference<java.lang.Character> value = this.charField.get();
+ if (value == null) {
+ synchronized (this.charField) {
+ value = this.charField.get();
+ if (value == null) {
+ value = new java.util.concurrent.atomic.AtomicReference<java.lang.Character>('1');
+ this.charField.set(value);
+ }
+ }
+ }
+ return value.get();
+ }
+}