code: @Override
    public SubclassRelationship getClassesDefinedByCall(Node callNode) {
      SubclassRelationship relationship =
          super.getClassesDefinedByCall(callNode);
      if (relationship != null) {
        return relationship;
      }
  
      Node callName = callNode.getFirstChild();
      SubclassType type = typeofClassDefiningName(callName);
      if (type != null) {
        Node subclass = null;
        Node superclass = callNode.getLastChild();
  
        // There are four possible syntaxes for a class-defining method:
        // goog.inherits(SubClass, SuperClass)
        // goog$inherits(SubClass, SuperClass)
        // goog.mixin(SubClass.prototype, SuperClass.prototype)
        // goog$mixin(SubClass.prototype, SuperClass.prototype)
        if (callNode.hasXChildren(3)) {
          // goog.inherits(SubClass, SuperClass)
          subclass = callName.getNext();
        } else {
          return null;
        }
  
        if (type == SubclassType.MIXIN) {
          // Only consider mixins that mix two prototypes as related to
          // inheritance.
          if (!endsWithPrototype(superclass)) {
            return null;
          }
          if (!endsWithPrototype(subclass)) {
            return null;
          }
          // Strip off the prototype from the name.
          subclass = subclass.getFirstChild();
          superclass = superclass.getFirstChild();
        }
  
        // bail out if either of the side of the "inherits"
        // isn't a real class name. This prevents us from
        // doing something weird in cases like:
        // goog.inherits(MySubClass, cond ? SuperClass1 : BaseClass2)
        if (subclass != null
            && subclass.isUnscopedQualifiedName()
            && superclass.isUnscopedQualifiedName()) {
          return new SubclassRelationship(type, subclass, superclass);
        }
      }
  
      return null;
    }
docs: {@inheritDoc}
  
  <p>Understands several different inheritance patterns that occur in
  Google code (various uses of {@code inherits} and {@code mixin}).