code: private List<Class<?>> packageClasses(final ExternalContext externalContext,
              final String scanPackages) throws ClassNotFoundException, IOException
      {
  
          List<Class<?>> list = new ArrayList<Class<?>>();
  
          String[] scanPackageTokens = scanPackages.split(",");
          for (String scanPackageToken : scanPackageTokens)
          {
              if (scanPackageToken.toLowerCase().endsWith(".jar"))
              {
                  URL jarResource = externalContext.getResource(WEB_LIB_PREFIX
                          + scanPackageToken);
                  String jarURLString = "jar:" + jarResource.toString() + "!/";
                  URL url = new URL(jarURLString);
                  JarFile jarFile = ((JarURLConnection) url.openConnection())
                          .getJarFile();
  
                  archiveClasses(jarFile, list);
              }
              else
              {
                  List<Class> list2 = new ArrayList<Class>();
                  _PackageInfo.getInstance().getClasses(list2, scanPackageToken);
                  for (Class c : list2)
                  {
                      list.add(c);                    
                  }
              }
          }
          return list;
      }
docs: <p>Return a list of the classes defined within the given packages
  If there are no such classes, a zero-length list will be returned.</p>
  
  @param scanPackages the package configuration
  
  @exception ClassNotFoundException if a located class cannot be loaded
  @exception IOException if an input/output error occurs