aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/after-delombok/DelegateOnGetter.java
blob: ae1ce32038211fdd1f44854a9ff568871fdf7585 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
class DelegateOnGetter {
	private final java.util.concurrent.atomic.AtomicReference<java.lang.Object> bar = new java.util.concurrent.atomic.AtomicReference<java.lang.Object>();
	private interface Bar {
		void setList(java.util.ArrayList<java.lang.String> list);
		int getInt();
	}
	@java.lang.SuppressWarnings("all")
	@javax.annotation.Generated("lombok")
	@lombok.Generated
	public Bar getBar() {
		java.lang.Object value = this.bar.get();
		if (value == null) {
			synchronized (this.bar) {
				value = this.bar.get();
				if (value == null) {
					final Bar actualValue = new Bar() {
						public void setList(java.util.ArrayList<String> list) {
						}
						public int getInt() {
							return 42;
						}
					};
					value = actualValue == null ? this.bar : actualValue;
					this.bar.set(value);
				}
			}
		}
		return (Bar) (value == this.bar ? null : value);
	}
	@java.lang.SuppressWarnings("all")
	@javax.annotation.Generated("lombok")
	@lombok.Generated
	public void setList(final java.util.ArrayList<java.lang.String> list) {
		this.getBar().setList(list);
	}
	@java.lang.SuppressWarnings("all")
	@javax.annotation.Generated("lombok")
	@lombok.Generated
	public int getInt() {
		return this.getBar().getInt();
	}
}