List<String> findInPackage(Test test,String packageName){
  List<String> localClsssOrPkgs=new ArrayList<String>();
  packageName=packageName.replace('.','/');
  Enumeration<URL> urls;
  try {
    urls=classloader.getResources(packageName);
    if (!urls.hasMoreElements()) {
      log.warn("Unable to find any resources for package '" + packageName + "'");
    }
  }
 catch (  IOException ioe) {
    log.warn("Could not read package: " + packageName);
    return localClsssOrPkgs;
  }
  return findInPackageWithUrls(test,packageName,urls);
}

List < String > findInPackage ( Test test , String packageName ) { List < String > localClsssOrPkgs = new ArrayList < String > ( ) ; packageName = packageName . replace ( '.' , '/' ) ; Enumeration < URL > urls ; try { urls = classloader . getResources ( packageName ) ; if ( ! urls . hasMoreElements ( ) ) { log . warn ( "Unable to find any resources for package '" + packageName + "'" ) ; } } catch ( IOException ioe ) { log . warn ( "Could not read package: " + packageName ) ; return localClsssOrPkgs ; } return findInPackageWithUrls ( test , packageName , urls ) ; }
scans for classes starting at the package provided and descending into subpackages . each class is offered up to the test as it is discovered , and if the test returns true the class is retained .
