org.gcube.common.scan
Class ClasspathScannerFactory

java.lang.Object
  extended by org.gcube.common.scan.ClasspathScannerFactory

public class ClasspathScannerFactory
extends Object

Creates ClasspathScanners for given URLs.

Author:
Fabio Simeoni

Constructor Summary
ClasspathScannerFactory()
           
 
Method Summary
static ClasspathScanner scanner()
          Returns a ClasspathScanner defined over all the URLs visible to the context classloader and its parents, up to the application classloader.
static ClasspathScanner scanner(Collection<URL> urls)
          Returns a ClasspathScanner defined over a given collection of URLs.
static void setScanner(ClasspathScanner scanner)
          Sets the scanner to return from scanner() and scanner(Collection) for testing purposes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClasspathScannerFactory

public ClasspathScannerFactory()
Method Detail

scanner

public static ClasspathScanner scanner()
Returns a ClasspathScanner defined over all the URLs visible to the context classloader and its parents, up to the application classloader.

Returns:
the scanner

scanner

public static ClasspathScanner scanner(Collection<URL> urls)
Returns a ClasspathScanner defined over a given collection of URLs.

Parameters:
the - URLs
Returns:
the scanner

setScanner

public static void setScanner(ClasspathScanner scanner)
Sets the scanner to return from scanner() and scanner(Collection) for testing purposes.

Parameters:
scanner - the scanner


Copyright © 2014. All Rights Reserved.