code: public boolean isEnclosedBy(ClassSymbol clazz) {
          for (Symbol sym = this; sym.kind != PCK; sym = sym.owner)
              if (sym == clazz) return true;
          return false;
      }
docs: Is this symbol the same as or enclosed by the given class?