code: public void findInPackage(final Test test, String packageName) {
          packageName = packageName.replace('.', '/');
          final ClassLoader loader = getClassLoader();
          Enumeration<URL> urls;
  
          try {
              urls = loader.getResources(packageName);
          } catch (final IOException ioe) {
              LOGGER.warn("Could not read package: " + packageName, ioe);
              return;
          }
  
          while (urls.hasMoreElements()) {
              try {
                  final URL url = urls.nextElement();
                  final String urlPath = extractPath(url);
  
                  LOGGER.info("Scanning for classes in [" + urlPath + "] matching criteria: " + test);
                  // Check for a jar in a war in JBoss
                  if (VFSZIP.equals(url.getProtocol())) {
                      final String path = urlPath.substring(0, urlPath.length() - packageName.length() - 2);
                      final URL newURL = new URL(url.getProtocol(), url.getHost(), path);
                      @SuppressWarnings("resource")
                      final JarInputStream stream = new JarInputStream(newURL.openStream());
                      try {
                          loadImplementationsInJar(test, packageName, path, stream);
                      } finally {
                          close(stream, newURL);
                      }
                  } else if (BUNDLE_RESOURCE.equals(url.getProtocol()) || BUNDLE.equals(url.getProtocol())) {
                      loadImplementationsInBundle(test, packageName);
                  } else {
                      final File file = new File(urlPath);
                      if (file.isDirectory()) {
                          loadImplementationsInDirectory(test, packageName, file);
                      } else {
                          loadImplementationsInJar(test, packageName, file);
                      }
                  }
              } catch (final IOException ioe) {
                  LOGGER.warn("could not read entries", ioe);
              } catch (final URISyntaxException e) {
                  LOGGER.warn("could not read entries", e);
              }
          }
      }
docs: 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. Accumulated classes can be
  fetched by calling {@link #getClasses()}.
  
  @param test
  an instance of {@link Test} that will be used to filter classes
  @param packageName
  the name of the package from which to start scanning for classes, e.g. {@code net.sourceforge.stripes}