1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
import lombok.Getter; import lombok.val; class MixGetterVal { private @Getter int x; MixGetterVal() { super(); } public void m(int z) { } public void test() { final @val int y = x; m(y); final @val int a = getX(); m(a); } public @java.lang.SuppressWarnings("all") int getX() { return this.x; } }