src/main/java/io/avaje/classpath/scanner/internal/scanner/classpath/ClassPathScanner.java
private Set<String> findResourceNames(Location location, Predicate<String> predicate) throws IOException {

    Set<String> resourceNames = new TreeSet<>();

    List<URL> locationsUrls = locationUrlsForPath(location);
    for (URL locationUrl : locationsUrls) {
      log.trace("scan {}", locationUrl.toExternalForm());

      UrlResolver urlResolver = createUrlResolver(locationUrl.getProtocol());
      URL resolvedUrl = urlResolver.toStandardJavaUrl(locationUrl);

      String protocol = resolvedUrl.getProtocol();
      ClassPathLocationScanner classPathLocationScanner = createLocationScanner(protocol);
      if (classPathLocationScanner == null) {
        String scanRoot = UrlUtils.toFilePath(resolvedUrl);
        log.warn("Unable to scan location: {} (unsupported protocol: {})", scanRoot, protocol);
      } else {
        Set<String> names = resourceNameCache.get(classPathLocationScanner).get(resolvedUrl);
        if (names == null) {
          names = classPathLocationScanner.findResourceNames(location.path(), resolvedUrl);
          resourceNameCache.get(classPathLocationScanner).put(resolvedUrl, names);
        }
        resourceNames.addAll(names);
      }
    }

    return filterResourceNames(resourceNames, predicate);
  }
/**
   * Finds the resources names present at this location and below on the classpath starting with this prefix and
   * ending with this suffix.
   */
Finds the resources names present at this location and below on the classpath starting with this prefix and
ending with this suffix.
Finds the resources names present at this location and below on the classpath starting with this prefix and ending with this suffix .
private Set<String> findResourceNames(Location location, Predicate<String> predicate) throws IOException {
    Set<String> resourceNames = new TreeSet<>();
    List<URL> locationsUrls = locationUrlsForPath(location);
    for (URL locationUrl : locationsUrls) {
      log.trace("scan {}", locationUrl.toExternalForm());
      UrlResolver urlResolver = createUrlResolver(locationUrl.getProtocol());
      URL resolvedUrl = urlResolver.toStandardJavaUrl(locationUrl);
      String protocol = resolvedUrl.getProtocol();
      ClassPathLocationScanner classPathLocationScanner = createLocationScanner(protocol);
      if (classPathLocationScanner == null) {
        String scanRoot = UrlUtils.toFilePath(resolvedUrl);
        log.warn("Unable to scan location: {} (unsupported protocol: {})", scanRoot, protocol);
      } else {
        Set<String> names = resourceNameCache.get(classPathLocationScanner).get(resolvedUrl);
        if (names == null) {
          names = classPathLocationScanner.findResourceNames(location.path(), resolvedUrl);
          resourceNameCache.get(classPathLocationScanner).put(resolvedUrl, names);
        }
        resourceNames.addAll(names);
      }
    }
    return filterResourceNames(resourceNames, predicate);
  }
private Set < String > findResourceNames ( Location location , Predicate < String > predicate ) throws IOException { Set < String > resourceNames = new TreeSet < > ( ) ; List < URL > locationsUrls = locationUrlsForPath ( location ) ; for ( URL locationUrl : locationsUrls ) { log . trace ( "scan {}" , locationUrl . toExternalForm ( ) ) ; UrlResolver urlResolver = createUrlResolver ( locationUrl . getProtocol ( ) ) ; URL resolvedUrl = urlResolver . toStandardJavaUrl ( locationUrl ) ; String protocol = resolvedUrl . getProtocol ( ) ; ClassPathLocationScanner classPathLocationScanner = createLocationScanner ( protocol ) ; if ( classPathLocationScanner == null ) { String scanRoot = UrlUtils . toFilePath ( resolvedUrl ) ; log . warn ( "Unable to scan location: {} (unsupported protocol: {})" , scanRoot , protocol ) ; } else { Set < String > names = resourceNameCache . get ( classPathLocationScanner ) . get ( resolvedUrl ) ; if ( names == null ) { names = classPathLocationScanner . findResourceNames ( location . path ( ) , resolvedUrl ) ; resourceNameCache . get ( classPathLocationScanner ) . put ( resolvedUrl , names ) ; } resourceNames . addAll ( names ) ; } } return filterResourceNames ( resourceNames , predicate ) ; }
Finds the resources names present at this location and below on the classpath starting with this prefix and
 ending with this suffix.
Finds the resources names present at this location and below on the classpath starting with this prefix and ending with this suffix .