private static void buildCrlist(URL root, ClasspathRoot classpath,
      String prefix, String packageName, List<ClassReader> crlist,
      boolean verbose) throws MalformedURLException {
    for (String resource : classpath.getResources(packageName)) {
      if (resource.endsWith(".class")) {
        String className = packageName + resource;
        //className = className.replace(".class", "").replace('/', '.');
        if (!className.contains("$")) {
          ClassReader cr;
          try {
            cr = getClassReader(classpath, className);
            if (validcr(cr, prefix)) {
              if (verbose) {
                System.out.println("Found: "
                    + cr.getClassName().replace("/", "."));
              }
              crlist.add(cr);
            }
          } catch (IOException e) {
            System.out.println("Failed to read " + className);
          }
        }
      } else if (resource.endsWith(".jar")) {
        String temp = root.getPath() + packageName + resource;
        URL jarRoot = new File(temp).toURI().toURL();
        ClasspathRoot jarPath = new JarClasspathRoot(jarRoot);
        buildCrlist(jarRoot, jarPath, prefix, "", crlist, verbose);
      } else {
        buildCrlist(root, classpath, prefix, packageName + resource + "/", crlist,
            verbose);
      }
    }
  }