@NotNull
  private static List<Path> collectClassFiles(@Nullable Path file) throws IOException {
    if (file == null || !Files.exists(file)) return Collections.emptyList();
    try (Stream<Path> stream = Files.walk(file)) {
      final PathMatcher matcher = FileSystems.getDefault().getPathMatcher(CLASS_FILE_PATTERN);
      return stream.filter(path -> matcher.matches(path.getFileName())).toList();
    }
  }
@NotNull
  private static List<Path> collectClassFiles(@Nullable Path file)