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 looks like you can't access the foo member variable, despite the fact that the class Clause is protected, and the member variable foo is also protected.
I just want to be able to check something about the member variable foo of the protected static class Clause. How can I do this (preferably without reflection)?
I would greatly prefer to not have to modify the parent class because it is a part of a library.