code: private static void visitResources(File packageDirectory, StringBuilder qualifiedNameBuilder, int qualifiedNamePrefixLength, ResourceVisitor visitor) {
  
      for (File childFile : packageDirectory.listFiles()) {
        String fileName = childFile.getName();
        qualifiedNameBuilder.setLength(qualifiedNamePrefixLength);
        if (childFile.isDirectory()) {
          StringBuilder subBuilder = new StringBuilder(qualifiedNameBuilder);
          subBuilder.append(fileName);
          subBuilder.append('/');
          if (visitor.visitPackage(subBuilder.toString())) {
            visitResources(childFile, subBuilder, subBuilder.length(), visitor);
          }
        } else {
          qualifiedNameBuilder.append(fileName);
          visitor.visitResource(qualifiedNameBuilder.toString());
        }
      }
    }
docs: This method scans the given {@code packageDirectory} recursively for resources.
  
  @param packageDirectory is the directory representing the {@link Package}.
  @param qualifiedNameBuilder is a {@link StringBuilder} containing the qualified prefix (the {@link Package} with a
  trailing dot).
  @param qualifiedNamePrefixLength the length of the prefix used to rest the string-builder after reuse.
  @param visitor is the {@link ResourceVisitor}.