Accessing protected member of static class in subclass of the parent
问题 The class ExtendedDismaxQParser has a static member class Clause: public class ExtendedDismaxQParser { protected static Class Clause { protected String foo, bar; } public Clause getAClause { Clause c; // misc code that isn't important return c; } } I then extended this class in a different package: public class SpecialDismaxQParser extends ExtendedDismaxQParser { public void whatever() { Clause c = super.getAClause(); boolean baz = c.foo.equals("foobar"); // <-- This doesn't compile } } It