blob: 10c456eb46a037d5f79c757db3ed8f1ab038a332 (
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
|
import lombok.experimental.var;
public class VarComplex {
private String field = "";
private static final int CONSTANT = 20;
<clinit>() {
}
public VarComplex() {
super();
}
public void testComplex() {
@var char[] shouldBeCharArray = field.toCharArray();
@var int shouldBeInt = CONSTANT;
@var java.lang.Object lock = new Object();
synchronized (lock)
{
@var int field = 20;
@var int inner = 10;
switch (field) {
case 5 :
@var char[] shouldBeCharArray2 = shouldBeCharArray;
@var int innerInner = inner;
}
}
@var java.lang.String shouldBeString = field;
}
}
|