code: public boolean isInheritedIn(Symbol clazz, Types types) {
          switch ((int)(flags_field & Flags.AccessFlags)) {
          default: // error recovery
          case PUBLIC:
              return true;
          case PRIVATE:
              return this.owner == clazz;
          case PROTECTED:
              // we model interfaces as extending Object
              return (clazz.flags() & INTERFACE) == 0;
          case 0:
              PackageSymbol thisPackage = this.packge();
              for (Symbol sup = clazz;
                   sup != null && sup != this.owner;
                   sup = types.supertype(sup.type).tsym) {
                  while (sup.type.hasTag(TYPEVAR))
                      sup = sup.type.getUpperBound().tsym;
                  if (sup.type.isErroneous())
                      return true; // error recovery
                  if ((sup.flags() & COMPOUND) != 0)
                      continue;
                  if (sup.packge() != thisPackage)
                      return false;
              }
              return (clazz.flags() & INTERFACE) == 0;
          }
      }
docs: Is this symbol inherited into a given class?
  PRE: If symbol's owner is a interface,
  it is already assumed that the interface is a superinterface
  of given class.
  @param clazz  The class for which we want to establish membership.
  This must be a subclass of the member's owner.