code: ScopeState visibilityIn(QualifiedName scope, QualifiedName type) {
      Set<QualifiedName> possibleConflicts = typesInScope(scope).get(type.getSimpleName());
      if (possibleConflicts.equals(ImmutableSet.of(type))) {
        return ScopeState.IN_SCOPE;
      } else if (!possibleConflicts.isEmpty()) {
        return ScopeState.HIDDEN;
      } else if (!scope.isTopLevel()) {
        return visibilityIn(scope.enclosingType(), type);
      } else {
        return visibilityIn(scope.getPackage(), type);
      }
    }
docs: Returns whether {@code type} is visible in, or can be imported into, the body of {@code type}.