}
@Override
public void visit(Tree.QualifiedType that) {
super.visit(that);
TypeDeclaration type = that.getDeclarationModel();
if (type!=null) {
if (!type.isVisible(that.getScope())) {
that.addError("member type is not visible: " +
qualifiedDescription(that), 400);
}
else if (type.isPackageVisibility() &&
!declaredInPackage(type, unit)) {
that.addError("package private member type is not visible: " +
qualifiedDescription(that));
}
//this is actually slightly too restrictive
//since a qualified type may in fact be an
//inherited member type, but in that case
//you can just get rid of the qualifier, so
//in fact this restriction is OK
else if (type.isProtectedVisibility() &&
!declaredInPackage(type, unit)) {
that.addError("protected member type is not visible: " +
qualifiedDescription(that));
}
//Note: we should remove this check if we ever