From 85fec0dffa5df13c0cafc86ca762774ba2c4d951 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Sun, 7 Jul 2013 21:41:47 +0200 Subject: eclipse support for the new @Getter(lazy=true) desugaring. --- .../resource/after-ecj/GetterLazyNative.java | 72 +++++++++++----------- 1 file changed, 36 insertions(+), 36 deletions(-) (limited to 'test/transform/resource/after-ecj/GetterLazyNative.java') diff --git a/test/transform/resource/after-ecj/GetterLazyNative.java b/test/transform/resource/after-ecj/GetterLazyNative.java index b67abfc9..db70f2f4 100644 --- a/test/transform/resource/after-ecj/GetterLazyNative.java +++ b/test/transform/resource/after-ecj/GetterLazyNative.java @@ -1,18 +1,18 @@ class GetterLazyNative { - private final @lombok.Getter(lazy = true) java.util.concurrent.atomic.AtomicReference> booleanField = new java.util.concurrent.atomic.AtomicReference>(); - private final @lombok.Getter(lazy = true) java.util.concurrent.atomic.AtomicReference> byteField = new java.util.concurrent.atomic.AtomicReference>(); - private final @lombok.Getter(lazy = true) java.util.concurrent.atomic.AtomicReference> shortField = new java.util.concurrent.atomic.AtomicReference>(); - private final @lombok.Getter(lazy = true) java.util.concurrent.atomic.AtomicReference> intField = new java.util.concurrent.atomic.AtomicReference>(); - private final @lombok.Getter(lazy = true) java.util.concurrent.atomic.AtomicReference> longField = new java.util.concurrent.atomic.AtomicReference>(); - private final @lombok.Getter(lazy = true) java.util.concurrent.atomic.AtomicReference> floatField = new java.util.concurrent.atomic.AtomicReference>(); - private final @lombok.Getter(lazy = true) java.util.concurrent.atomic.AtomicReference> doubleField = new java.util.concurrent.atomic.AtomicReference>(); - private final @lombok.Getter(lazy = true) java.util.concurrent.atomic.AtomicReference> charField = new java.util.concurrent.atomic.AtomicReference>(); - private final @lombok.Getter(lazy = true) java.util.concurrent.atomic.AtomicReference> intArrayField = new java.util.concurrent.atomic.AtomicReference>(); + private final @lombok.Getter(lazy = true) java.util.concurrent.atomic.AtomicReference booleanField = new java.util.concurrent.atomic.AtomicReference(); + private final @lombok.Getter(lazy = true) java.util.concurrent.atomic.AtomicReference byteField = new java.util.concurrent.atomic.AtomicReference(); + private final @lombok.Getter(lazy = true) java.util.concurrent.atomic.AtomicReference shortField = new java.util.concurrent.atomic.AtomicReference(); + private final @lombok.Getter(lazy = true) java.util.concurrent.atomic.AtomicReference intField = new java.util.concurrent.atomic.AtomicReference(); + private final @lombok.Getter(lazy = true) java.util.concurrent.atomic.AtomicReference longField = new java.util.concurrent.atomic.AtomicReference(); + private final @lombok.Getter(lazy = true) java.util.concurrent.atomic.AtomicReference floatField = new java.util.concurrent.atomic.AtomicReference(); + private final @lombok.Getter(lazy = true) java.util.concurrent.atomic.AtomicReference doubleField = new java.util.concurrent.atomic.AtomicReference(); + private final @lombok.Getter(lazy = true) java.util.concurrent.atomic.AtomicReference charField = new java.util.concurrent.atomic.AtomicReference(); + private final @lombok.Getter(lazy = true) java.util.concurrent.atomic.AtomicReference intArrayField = new java.util.concurrent.atomic.AtomicReference(); GetterLazyNative() { super(); } public @java.lang.SuppressWarnings("all") boolean isBooleanField() { - java.util.concurrent.atomic.AtomicReference value = this.booleanField.get(); + java.lang.Object value = this.booleanField.get(); if ((value == null)) { synchronized (this.booleanField) @@ -21,15 +21,15 @@ class GetterLazyNative { if ((value == null)) { final boolean actualValue = true; - value = new java.util.concurrent.atomic.AtomicReference(actualValue); + value = actualValue; this.booleanField.set(value); } } } - return value.get(); + return (java.lang.Boolean) value; } public @java.lang.SuppressWarnings("all") byte getByteField() { - java.util.concurrent.atomic.AtomicReference value = this.byteField.get(); + java.lang.Object value = this.byteField.get(); if ((value == null)) { synchronized (this.byteField) @@ -38,15 +38,15 @@ class GetterLazyNative { if ((value == null)) { final byte actualValue = 1; - value = new java.util.concurrent.atomic.AtomicReference(actualValue); + value = actualValue; this.byteField.set(value); } } } - return value.get(); + return (java.lang.Byte) value; } public @java.lang.SuppressWarnings("all") short getShortField() { - java.util.concurrent.atomic.AtomicReference value = this.shortField.get(); + java.lang.Object value = this.shortField.get(); if ((value == null)) { synchronized (this.shortField) @@ -55,15 +55,15 @@ class GetterLazyNative { if ((value == null)) { final short actualValue = 1; - value = new java.util.concurrent.atomic.AtomicReference(actualValue); + value = actualValue; this.shortField.set(value); } } } - return value.get(); + return (java.lang.Short) value; } public @java.lang.SuppressWarnings("all") int getIntField() { - java.util.concurrent.atomic.AtomicReference value = this.intField.get(); + java.lang.Object value = this.intField.get(); if ((value == null)) { synchronized (this.intField) @@ -72,15 +72,15 @@ class GetterLazyNative { if ((value == null)) { final int actualValue = 1; - value = new java.util.concurrent.atomic.AtomicReference(actualValue); + value = actualValue; this.intField.set(value); } } } - return value.get(); + return (java.lang.Integer) value; } public @java.lang.SuppressWarnings("all") long getLongField() { - java.util.concurrent.atomic.AtomicReference value = this.longField.get(); + java.lang.Object value = this.longField.get(); if ((value == null)) { synchronized (this.longField) @@ -89,15 +89,15 @@ class GetterLazyNative { if ((value == null)) { final long actualValue = 1; - value = new java.util.concurrent.atomic.AtomicReference(actualValue); + value = actualValue; this.longField.set(value); } } } - return value.get(); + return (java.lang.Long) value; } public @java.lang.SuppressWarnings("all") float getFloatField() { - java.util.concurrent.atomic.AtomicReference value = this.floatField.get(); + java.lang.Object value = this.floatField.get(); if ((value == null)) { synchronized (this.floatField) @@ -106,15 +106,15 @@ class GetterLazyNative { if ((value == null)) { final float actualValue = 1.0f; - value = new java.util.concurrent.atomic.AtomicReference(actualValue); + value = actualValue; this.floatField.set(value); } } } - return value.get(); + return (java.lang.Float) value; } public @java.lang.SuppressWarnings("all") double getDoubleField() { - java.util.concurrent.atomic.AtomicReference value = this.doubleField.get(); + java.lang.Object value = this.doubleField.get(); if ((value == null)) { synchronized (this.doubleField) @@ -123,15 +123,15 @@ class GetterLazyNative { if ((value == null)) { final double actualValue = 1.0; - value = new java.util.concurrent.atomic.AtomicReference(actualValue); + value = actualValue; this.doubleField.set(value); } } } - return value.get(); + return (java.lang.Double) value; } public @java.lang.SuppressWarnings("all") char getCharField() { - java.util.concurrent.atomic.AtomicReference value = this.charField.get(); + java.lang.Object value = this.charField.get(); if ((value == null)) { synchronized (this.charField) @@ -140,15 +140,15 @@ class GetterLazyNative { if ((value == null)) { final char actualValue = '1'; - value = new java.util.concurrent.atomic.AtomicReference(actualValue); + value = actualValue; this.charField.set(value); } } } - return value.get(); + return (java.lang.Character) value; } public @java.lang.SuppressWarnings("all") int[] getIntArrayField() { - java.util.concurrent.atomic.AtomicReference value = this.intArrayField.get(); + java.lang.Object value = this.intArrayField.get(); if ((value == null)) { synchronized (this.intArrayField) @@ -157,11 +157,11 @@ class GetterLazyNative { if ((value == null)) { final int[] actualValue = new int[]{1}; - value = new java.util.concurrent.atomic.AtomicReference(actualValue); + value = ((actualValue == null) ? this.intArrayField : actualValue); this.intArrayField.set(value); } } } - return value.get(); + return (int[]) ((value == this.intArrayField) ? null : value); } } -- cgit