import java.util.*; import lombok.val; public class ValOutersWithGenerics { class Inner { Inner() { super(); } } class InnerWithGenerics { InnerWithGenerics() { super(); } } static class SubClass extends ValOutersWithGenerics { SubClass() { super(); } public void testSubClassOfOutersWithGenerics() { List list = new ArrayList(); final @val ValOutersWithGenerics.Inner elem = list.get(0); } } public ValOutersWithGenerics() { super(); } public void testOutersWithGenerics() { final @val java.lang.String foo = ""; List list = new ArrayList(); final @val ValOutersWithGenerics.Inner elem = list.get(0); } public void testLocalClasses() { class Local { Local() { super(); } } final @val Local q = new Local(); } public static void test() { final @val ValOutersWithGenerics outer = new ValOutersWithGenerics(); final @val ValOutersWithGenerics.Inner inner1 = outer.new Inner(); final @val ValOutersWithGenerics.InnerWithGenerics inner2 = outer.new InnerWithGenerics(); } public static void loop(Map map) { for (final @val java.util.Map.Entry e : map.entrySet()) { } } }