docs: public Class[] getClasses(final List<Class> classes, final String pckgname)
              throws ClassNotFoundException
      {
  
          Enumeration resources;
          ClassLoader cld;
          String path;
          try
          {
  
              // convert the package name to a path
              path = pckgname.replace('.', '/');
  
              cld = ClassUtils.getContextClassLoader();
              if (cld == null)
              {
                  throw new ClassNotFoundException("Can't get class loader.");
              }
  
              // find the entry points to the classpath
              resources = cld.getResources(path);
              if (resources == null || !resources.hasMoreElements())
              {
                  throw new ClassNotFoundException("No resource for " + path);
              }
  
          }
          catch (NullPointerException e)
          {
              throw (ClassNotFoundException) new ClassNotFoundException(pckgname
                      + " (" + pckgname
                      + ") does not appear to be a valid package", e);
          }
          catch (IOException e)
          {
              throw (ClassNotFoundException) new ClassNotFoundException(pckgname
                      + " (" + pckgname
                      + ") does not appear to be a valid package", e);
          }
  
          // iterate through all resources containing the package in question
          while (resources.hasMoreElements())
          {
              URL resource = (URL) resources.nextElement();
              URLConnection connection = null;
              try
              {
                  connection = resource.openConnection();
              }
              catch (IOException e)
              {
                  throw (ClassNotFoundException) new ClassNotFoundException(
                          pckgname + " (" + pckgname
                                  + ") does not appear to be a valid package", e);
              }
  
              if (connection instanceof JarURLConnection)
              {
                  // iterate trhough all the entries in the jar
                  JarURLConnection juc = (JarURLConnection) connection;
                  JarFile jarFile = null;
                  try
                  {
                      jarFile = juc.getJarFile();
                  }
                  catch (IOException e)
                  {
                      throw (ClassNotFoundException) new ClassNotFoundException(
                              pckgname + " (" + pckgname
                                      + ") does not appear to be a valid package",
                              e);
                  }
                  Enumeration<JarEntry> entries = jarFile.entries();
                  while (entries.hasMoreElements())
                  {
                      JarEntry jarEntry = entries.nextElement();
                      String entryName = jarEntry.getName();
                      if (!entryName.startsWith(path))
                      {
                          continue;
                      }
                      if (!entryName.toLowerCase().endsWith(".class"))
                      {
                          continue;
                      }
                      String className = filenameToClassname(entryName);
                      loadClass(classes, cld, className);
                  }
              }
              else
              {
                  // iterate trhough all the children starting with the package name
                  File file;
                  try
                  {
                      file = new File(connection.getURL().toURI());
                  }
                  catch (URISyntaxException e)
                  {
                      log().log(Level.WARNING, "error loading directory " + connection, e);
                      continue;
                  }
  
                  listFilesRecursive(classes, file, cld, pckgname);
              }
          }
  
          if (classes.size() < 1)
          {
              throw new ClassNotFoundException(pckgname
                      + " does not appear to be a valid package");
          }
  
          Class[] resolvedClasses = new Class[classes.size()];
          classes.toArray(resolvedClasses);
          return resolvedClasses;
  
      }