aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-eclipse/GetterLazyNative.java
diff options
context:
space:
mode:
authorpeichhorn <peichhor@web.de>2011-06-01 02:44:53 +0200
committerpeichhorn <peichhor@web.de>2011-06-01 02:44:53 +0200
commit850c3eaf07cd4beb2276b5e10296132b6ed3d7a6 (patch)
tree0c655e95d0979a2e2a500eafc4bb8011f892f9ab /test/transform/resource/after-eclipse/GetterLazyNative.java
parentaa96fcbc7724ccd0306b6df0b1aaa9f86aa1d507 (diff)
downloadlombok-850c3eaf07cd4beb2276b5e10296132b6ed3d7a6.tar.gz
lombok-850c3eaf07cd4beb2276b5e10296132b6ed3d7a6.tar.bz2
lombok-850c3eaf07cd4beb2276b5e10296132b6ed3d7a6.zip
Added a test infrastructure that simulates eclipse with diet-parse, type-binding and so forth. Similar to eclipse, the test needs to be executed with lombok as vm-agent. @Delegate runs with this setup, sadly val does not, at least for now.
And as expected the tests shows that @Synchronized and @SneakyThrows are currently broken for eclipse but not for ecj.
Diffstat (limited to 'test/transform/resource/after-eclipse/GetterLazyNative.java')
-rw-r--r--test/transform/resource/after-eclipse/GetterLazyNative.java158
1 files changed, 158 insertions, 0 deletions
diff --git a/test/transform/resource/after-eclipse/GetterLazyNative.java b/test/transform/resource/after-eclipse/GetterLazyNative.java
new file mode 100644
index 00000000..6c90a101
--- /dev/null
+++ b/test/transform/resource/after-eclipse/GetterLazyNative.java
@@ -0,0 +1,158 @@
+class GetterLazyNative {
+ private final @lombok.Getter(lazy = true) 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 @lombok.Getter(lazy = true) 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 @lombok.Getter(lazy = true) 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 @lombok.Getter(lazy = true) 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 @lombok.Getter(lazy = true) 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 @lombok.Getter(lazy = true) 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 @lombok.Getter(lazy = true) 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 @lombok.Getter(lazy = true) 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>>();
+ private final @lombok.Getter(lazy = true) java.util.concurrent.atomic.AtomicReference<java.util.concurrent.atomic.AtomicReference<int[]>> intArrayField = new java.util.concurrent.atomic.AtomicReference<java.util.concurrent.atomic.AtomicReference<int[]>>();
+ public @java.lang.SuppressWarnings("all") boolean isBooleanField() {
+ 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();
+ }
+ public @java.lang.SuppressWarnings("all") 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();
+ }
+ public @java.lang.SuppressWarnings("all") 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();
+ }
+ public @java.lang.SuppressWarnings("all") 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();
+ }
+ public @java.lang.SuppressWarnings("all") 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();
+ }
+ public @java.lang.SuppressWarnings("all") 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();
+ }
+ public @java.lang.SuppressWarnings("all") 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();
+ }
+ public @java.lang.SuppressWarnings("all") 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();
+ }
+ public @java.lang.SuppressWarnings("all") int[] getIntArrayField() {
+ java.util.concurrent.atomic.AtomicReference<int[]> value = this.intArrayField.get();
+ if ((value == null))
+ {
+ synchronized (this.intArrayField)
+ {
+ value = this.intArrayField.get();
+ if ((value == null))
+ {
+ value = new java.util.concurrent.atomic.AtomicReference<int[]>(new int[]{1});
+ this.intArrayField.set(value);
+ }
+ }
+ }
+ return value.get();
+ }
+ GetterLazyNative() {
+ super();
+ }
+} \ No newline at end of file