/** * Checks if the specified path is on the ignore list * * @param p * the path to check * * @return true if the path should be ignored */ private boolean isIgnored(Path p) { final String path = toFQName(p); return this.ignoredFolders.stream().anyMatch(path::startsWith); }
/** * Scans the jar and filters all elements * * @param u * the uri of the jar file to be scanned * @param pathPredicate * the matching predicate for collecting the entries * * @return a stream of collected strings */ private Collection<String> scanJar(URI u, Predicate<Path> pathPredicate) { try (FileSystem fs = FileSystems.newFileSystem(u, READY_ONLY_ENV)) { return Files.walk(fs.getPath("/")) .filter(pathPredicate) .map(f -> toFQName(f.toAbsolutePath())) .distinct() .collect(Collectors.toList()); } catch (IOException e) { throw new UncheckedException(e); } }