docs: static ClassInfo addScannedClass(final String className, final int classModifiers,
              final boolean isExternalClass, final Map<String, ClassInfo> classNameToClassInfo,
              final ClasspathElement classpathElement, final Resource classfileResource) {
          ClassInfo classInfo = classNameToClassInfo.get(className);
          if (classInfo == null) {
              // This is the first time this class has been seen, add it
              classNameToClassInfo.put(className,
                      classInfo = new ClassInfo(className, classModifiers, classfileResource));
          } else {
              // There was a previous placeholder ClassInfo class added, due to the class being referred
              // to as a superclass, interface or annotation. The isScannedClass field should be false
              // in this case, since the actual class definition wasn't reached before now.
              if (classInfo.isScannedClass) {
                  // The class should not have been scanned more than once, because of classpath masking
                  throw new IllegalArgumentException("Class " + className
                          + " should not have been encountered more than once due to classpath masking --"
                          + " please report this bug at: https://github.com/classgraph/classgraph/issues");
              }
          }
  
          // Mark the class as scanned
          classInfo.isScannedClass = true;
  
          // Mark the class as non-external if it is a whitelisted class
          classInfo.isExternalClass = isExternalClass;
  
          // Remember which classpath element (zipfile / classpath root directory / module) the class was found in
          classInfo.classpathElement = classpathElement;
  
          // Remember which classloader is used to load the class
          classInfo.classLoader = classpathElement.getClassLoader();
  
          return classInfo;
      }