code: static void splitHeaders(ClassList classes) {
          Set<String> ctVersions = new HashSet<>();
  
          for (ClassDescription cd : classes) {
              for (ClassHeaderDescription header : cd.header) {
                  for (char c : header.versions.toCharArray()) {
                      ctVersions.add("" + c);
                  }
              }
          }
  
          classes.sort();
  
          for (ClassDescription cd : classes) {
              Map<String, String> outerSignatures2Version = new HashMap<>();
  
              for (String version : ctVersions) { //XXX
                  ClassDescription outer = cd;
                  String outerSignatures = "";
  
                  while ((outer = classes.enclosingClass(outer)) != null) {
                      for (ClassHeaderDescription outerHeader : outer.header) {
                          if (outerHeader.versions.contains(version)) {
                              outerSignatures += outerHeader.signature;
                          }
                      }
                  }
  
                  outerSignatures2Version.compute(outerSignatures,
                                                   (key, value) -> value != null ? value + version : version);
              }
  
              List<ClassHeaderDescription> newHeaders = new ArrayList<>();
  
              HEADER_LOOP: for (ClassHeaderDescription header : cd.header) {
                  for (String versions : outerSignatures2Version.values()) {
                      if (containsAll(versions, header.versions)) {
                          newHeaders.add(header);
                          continue HEADER_LOOP;
                      }
                      if (disjoint(versions, header.versions)) {
                          continue;
                      }
                      ClassHeaderDescription newHeader = new ClassHeaderDescription();
                      newHeader.classAnnotations = header.classAnnotations;
                      newHeader.deprecated = header.deprecated;
                      newHeader.extendsAttr = header.extendsAttr;
                      newHeader.flags = header.flags;
                      newHeader.implementsAttr = header.implementsAttr;
                      newHeader.innerClasses = header.innerClasses;
                      newHeader.runtimeAnnotations = header.runtimeAnnotations;
                      newHeader.signature = header.signature;
                      newHeader.versions = reduce(versions, header.versions);
  
                      newHeaders.add(newHeader);
                  }
              }
  
              cd.header = newHeaders;
          }
      }
docs: Changes to class header of an outer class (like adding a new type parameter) may affect
  its innerclasses. So if the outer class's header is different for versions A and B, need to
  split its innerclasses headers to also be different for versions A and B.