docs: public static void addCalculatedModuleResources(
          List<CmsResource> result,
          final CmsObject cms,
          final List<CmsResource> moduleResources,
          final List<String> excludeResources)
      throws CmsException {
  
          for (CmsResource resource : moduleResources) {
  
              String sitePath = cms.getSitePath(resource);
  
              List<String> excludedSubResources = getExcludedForResource(sitePath, excludeResources);
  
              // check if resources have to be excluded
              if (excludedSubResources.isEmpty()) {
                  // no resource has to be excluded - add the whole resource
                  // (that is, also all resources in the folder, if the resource is a folder)
                  result.add(resource);
              } else {
                  // cannot add the complete resource (i.e., including the whole sub-tree)
                  if (CmsStringUtil.comparePaths(sitePath, excludedSubResources.get(0))) {
                      // the resource itself is excluded -> do not add it and check the next resource
                      continue;
                  }
                  // try to include sub-resources.
                  List<CmsResource> subResources = cms.readResources(sitePath, CmsResourceFilter.ALL, false);
                  addCalculatedModuleResources(result, cms, subResources, excludedSubResources);
              }
          }
  
      }