@Getter(lazy=true) now also works in Eclipse

This commit is contained in:
Roel Spilker committed 2010-11-11 05:55:15 +01:00
1 parent a9113718ae
commit 3f00e7c905
13 files changed
+570 -22

No files matched your search

@@ -0,0 +1,27 @@
class GetterLazy {
static class ValueType {
ValueType() {
super();
}
}
private final @lombok.Getter(lazy = true) java.util.concurrent.atomic.AtomicReference<java.util.concurrent.atomic.AtomicReference<ValueType>> fieldName = new java.util.concurrent.atomic.AtomicReference<java.util.concurrent.atomic.AtomicReference<ValueType>>();
public @java.lang.SuppressWarnings("all") 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();
}
GetterLazy() {
super();
}
}