public class B { static interface T extends C {} // not public, so this shouldn't be tracked as an inherited dependency private class Q implements E {} public void x(int i) { // not public, not an inherited dependency D j = new D() {}; } }