code: protected boolean isVisible(ClassSymbol sym) {
          long mod = sym.flags_field;
          if (!showAccess.checkModifier(translateModifiers(mod))) {
              return false;
          }
          ClassSymbol encl = sym.owner.enclClass();
          return (encl == null || (mod & Flags.STATIC) != 0 || isVisible(encl));
      }
docs: Check the visibility if this is an nested class.
  if this is not a nested class, return true.
  if this is an static visible nested class,
  return true.
  if this is an visible nested class
  if the outer class is visible return true.
  else return false.
  IMPORTANT: This also allows, static nested classes
  to be defined inside an nested class, which is not
  allowed by the compiler. So such an test case will
  not reach upto this method itself, but if compiler
  allows it, then that will go through.