code: public static Class[] getImplementorClasses( Class interfaceType )
      {
          String interfaceName = interfaceType.getName();
          ArrayList/*< Class >*/ classes = new ArrayList/*< Class >*/();
          ClassLoader classLoader = getClassLoader();
          
          try
          {
              Enumeration e = classLoader.getResources( "META-INF/services/" + interfaceName );
              
              while ( e.hasMoreElements() )
              {
                  URL url = ( URL ) e.nextElement();
                  
                  if ( _log.isTraceEnabled() )
                  {
                      _log.trace( "Found implementor entry for interface " + interfaceName + " at " + url );
                  }
                  
                  InputStream is = null;
                  String className = null;
                  
                  try
                  {
                      is = url.openStream();
                      BufferedReader reader = new BufferedReader( new InputStreamReader( is ) );
                      className = reader.readLine().trim();
                      Class implementorClass = loadImplementorClass( className, interfaceType, classLoader );
                      if ( implementorClass != null ) classes.add( implementorClass );
                  }
                  catch ( IOException ioe )
                  {
                      _log.error( "Could not read implementor class entry at + " + url );
                  }
                  finally
                  {
                      if ( is != null ) is.close();
                  }
              }
          }
          catch ( IOException e )
          {
              _log.error( "Could not discover implementors for " + interfaceName, e );
          }
          
          return ( Class[] ) classes.toArray( new Class[0] );
      }
docs: Get all implementor classes (on the context classpath) that implement a given interface.
  
  @param interfaceType the Class that represents the interface.
  @return an array of Classes that are implementations of <code>interfaceType</code>.