Search in sources :

Example 1 with FilesScanner

use of com.sun.jersey.core.spi.scanning.FilesScanner in project platformlayer by platformlayer.

the class JerseyAnnotationDiscovery method buildScanner.

private Scanner buildScanner(URLClassLoader classLoader) {
    List<File> paths = Lists.newArrayList();
    for (URL url : classLoader.getURLs()) {
        if (!"file".equals(url.getProtocol())) {
            continue;
        }
        paths.add(new File(url.getFile()));
    }
    Scanner scanner = new FilesScanner(paths.toArray(new File[paths.size()]));
    return scanner;
}
Also used : FilesScanner(com.sun.jersey.core.spi.scanning.FilesScanner) Scanner(com.sun.jersey.core.spi.scanning.Scanner) FilesScanner(com.sun.jersey.core.spi.scanning.FilesScanner) File(java.io.File) URL(java.net.URL)

Aggregations

FilesScanner (com.sun.jersey.core.spi.scanning.FilesScanner)1 Scanner (com.sun.jersey.core.spi.scanning.Scanner)1 File (java.io.File)1 URL (java.net.URL)1