public static void accept()

in src/main/java/org/apache/maven/shared/dependency/analyzer/ClassFileVisitorUtils.java [51:69]


    public static void accept(URL url, ClassFileVisitor visitor) throws IOException {
        if (url.getPath().endsWith(".jar")) {
            acceptJar(url, visitor);
        } else if (url.getProtocol().equalsIgnoreCase("file")) {
            try {
                File file = new File(new URI(url.toString()));

                if (file.isDirectory()) {
                    acceptDirectory(file, visitor);
                } else if (file.exists()) {
                    throw new IllegalArgumentException("Cannot accept visitor on URL: " + url);
                }
            } catch (URISyntaxException exception) {
                throw new IllegalArgumentException("Cannot accept visitor on URL: " + url, exception);
            }
        } else {
            throw new IllegalArgumentException("Cannot accept visitor on URL: " + url);
        }
    }