code: private ObjectType findMethodOwner(Node n) {
      if (n == null) {
        return null;
      }
      Node parent = n.getParent();
      FunctionType ctor = null;
      if (parent.isAssign()) {
        Node target = parent.getFirstChild();
        if (NodeUtil.isPrototypeProperty(target)) {
          // TODO(johnlenz): handle non-global types
          JSType type = registry.getGlobalType(target.getFirstFirstChild().getQualifiedName());
          ctor = type != null ? ((ObjectType) type).getConstructor() : null;
        }
      } else if (parent.isClass()) {
        // TODO(sdh): test this case once the type checker understands ES6 classes
        ctor = parent.getJSType().toMaybeFunctionType();
      }
      return ctor != null ? ctor.getInstanceType() : null;
    }
docs: Given a method definition node, returns the {@link ObjectType} corresponding
  to the class the method is defined on, or null if it is not a prototype method.