code: @Nullable
    private static ObjectType getSuperClassInstanceIfFinal(@Nullable JSType type) {
      if (type == null) {
        return null;
      }
  
      ObjectType obj = type.toObjectType();
      FunctionType ctor = (obj == null) ? null : obj.getSuperClassConstructor();
      JSDocInfo doc = (ctor == null) ? null : ctor.getJSDocInfo();
      if (doc != null && doc.isFinal()) {
        return ctor.getInstanceType();
      }
  
      return null;
    }
docs: If the superclass is final, this method returns an instance of the superclass.