code: public static Class[] getClasses(String basePackage, Class[] requiredInterfaces)
      {
          List classes = new ArrayList();
          ClassCriteria criteria = new ClassCriteria(requiredInterfaces);
          String basePath = basePackage.replace('.', File.separatorChar);
          String[] resourcesNames = classpathResources.getResources(basePath, criteria);
          for (int i = 0; i < resourcesNames.length; i++)
          {
              String resourceName = resourcesNames[i];
              if (resourceName == null)
              {
                  continue;
              }
              String className = getClassName(resourceName);
              try
              {
                  Class c = Class.forName(className);
                  classes.add(c);
              }
              catch (ClassNotFoundException e)
              {
                  // This should not happen since we've already validated the class
              }
          }
          return (Class[]) classes.toArray(new Class[classes.size()]);
      }
docs: Returns an array of concrete classes in the given package that implement
  all of the specified interfaces.
  
  @param  basePackage the name of the package containing the classes to discover
  @param  requiredInterfaces the intefaces that the returned classes must implement
  @return an array of concrete classes in the given package that implement the
  specified interface