Class URLPackageScanner


  • public class URLPackageScanner
    extends Object
    Taken from the ShrinkWrap impl. Implementation of scanner which can scan a URLClassLoader
    Author:
    Thomas Heute, Gavin King, Norman Richards, Pete Muir, Aslak Knutsen
    • Method Detail

      • newInstance

        public static URLPackageScanner newInstance​(boolean addRecursively,
                                                    ClassLoader classLoader,
                                                    URLPackageScanner.Callback callback,
                                                    String packageName)
        Factory method to create an instance of URLPackageScanner.
        Parameters:
        addRecursively - flag to add child packages
        classLoader - class loader that will have classes added
        pkg - Package that will be scanned
        Returns:
        new instance of URLPackageScanner
      • newInstance

        public static URLPackageScanner newInstance​(boolean addRecursively,
                                                    ClassLoader classLoader,
                                                    URLPackageScanner.Callback callback)
        Factory method to create an instance of URLPackageScanner in the default package
        Parameters:
        pkg - Package that will be scanned
        addRecursively - flag to add child packages
        classLoader - class loader that will have classes added
        Returns:
        new instance of URLPackageScanner
      • scanPackage

        public void scanPackage()