1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
import lombok.experimental.Helper; class HelperTest { { final int z = 5; if (Boolean.TRUE) { @Helper class H1 { void foo(int x) { System.out.println("Hello, " + (x + z)); } } foo(10); @Helper class H2 { void bar() { foo(12); } } } } }