docs: void link(final Map<String, ClassInfo> classNameToClassInfo,
              final Map<String, PackageInfo> packageNameToPackageInfo,
              final Map<String, ModuleInfo> moduleNameToModuleInfo) {
          boolean isModuleDescriptor = false;
          boolean isPackageDescriptor = false;
          ClassInfo classInfo = null;
          if (className.equals("module-info")) {
              isModuleDescriptor = true;
  
          } else if (className.equals("package-info") || className.endsWith(".package-info")) {
              isPackageDescriptor = true;
  
          } else {
              // Handle regular classfile
              classInfo = ClassInfo.addScannedClass(className, classModifiers, isExternalClass, classNameToClassInfo,
                      classpathElement, classfileResource);
              classInfo.setModifiers(classModifiers);
              classInfo.setIsInterface(isInterface);
              classInfo.setIsAnnotation(isAnnotation);
              if (superclassName != null) {
                  classInfo.addSuperclass(superclassName, classNameToClassInfo);
              }
              if (implementedInterfaces != null) {
                  for (final String interfaceName : implementedInterfaces) {
                      classInfo.addImplementedInterface(interfaceName, classNameToClassInfo);
                  }
              }
              if (classAnnotations != null) {
                  for (final AnnotationInfo classAnnotation : classAnnotations) {
                      classInfo.addClassAnnotation(classAnnotation, classNameToClassInfo);
                  }
              }
              if (classContainmentEntries != null) {
                  ClassInfo.addClassContainment(classContainmentEntries, classNameToClassInfo);
              }
              if (annotationParamDefaultValues != null) {
                  classInfo.addAnnotationParamDefaultValues(annotationParamDefaultValues);
              }
              if (fullyQualifiedDefiningMethodName != null) {
                  classInfo.addFullyQualifiedDefiningMethodName(fullyQualifiedDefiningMethodName);
              }
              if (fieldInfoList != null) {
                  classInfo.addFieldInfo(fieldInfoList, classNameToClassInfo);
              }
              if (methodInfoList != null) {
                  classInfo.addMethodInfo(methodInfoList, classNameToClassInfo);
              }
              if (typeSignature != null) {
                  classInfo.setTypeSignature(typeSignature);
              }
              if (refdClassNames != null) {
                  classInfo.addReferencedClassNames(refdClassNames);
              }
          }
  
          // Get or create PackageInfo, if this is not a module descriptor (the module descriptor's package is "")
          PackageInfo packageInfo = null;
          if (!isModuleDescriptor) {
              // Get package for this class or package descriptor
              packageInfo = PackageInfo.getOrCreatePackage(PackageInfo.getParentPackageName(className),
                      packageNameToPackageInfo);
              if (isPackageDescriptor) {
                  // Add any class annotations on the package-info.class file to the ModuleInfo
                  packageInfo.addAnnotations(classAnnotations);
              } else if (classInfo != null) {
                  // Add ClassInfo to PackageInfo, and vice versa
                  packageInfo.addClassInfo(classInfo);
                  classInfo.packageInfo = packageInfo;
              }
          }
  
          // Get or create ModuleInfo, if there is a module name
          final String moduleName = classpathElement.getModuleName();
          if (moduleName != null) {
              // Get or create a ModuleInfo object for this module
              ModuleInfo moduleInfo = moduleNameToModuleInfo.get(moduleName);
              if (moduleInfo == null) {
                  moduleNameToModuleInfo.put(moduleName,
                          moduleInfo = new ModuleInfo(classfileResource.getModuleRef(), classpathElement));
              }
              if (isModuleDescriptor) {
                  // Add any class annotations on the module-info.class file to the ModuleInfo
                  moduleInfo.addAnnotations(classAnnotations);
              }
              if (classInfo != null) {
                  // Add ClassInfo to ModuleInfo, and vice versa
                  moduleInfo.addClassInfo(classInfo);
                  classInfo.moduleInfo = moduleInfo;
              }
              if (packageInfo != null) {
                  // Add PackageInfo to ModuleInfo
                  moduleInfo.addPackageInfo(packageInfo);
              }
          }
  
      }