class A extends B.<ref>Foo implements B{ } interface B{ static class Foo{ } }