code: public static <T> void getSubClasses(Class<T> className, boolean allowAbstract, boolean allowInterface,
  			boolean allowEnum, Collection<Class<? extends T>> result) {
  		final String[] entries = System.getProperty("java.class.path") //$NON-NLS-1$
  				.split(Pattern.quote(System.getProperty("path.separator"))); //$NON-NLS-1$
  		String lentry;
  
  		for (final String path : entries) {
  			lentry = path.toLowerCase();
  			if (lentry.endsWith(".jar") || lentry.endsWith(".war")) { //$NON-NLS-1$ //$NON-NLS-2$
  				getSubClassesFromJar(result, path, className, allowAbstract, allowInterface, allowEnum);
  			} else {
  				getSubClassesFromFileSystem(result, path, className, allowAbstract, allowInterface, allowEnum);
  			}
  
  		}
  	}
docs: Replies the list of all the subclasses of the given class
  in the current classpath.
  
  @param <T> is the type of the superclass.
  @param className is the name of the class to explore.
  @param allowAbstract is <code>true</code> to allow abstract classes to be put in the replied list
  @param allowInterface is <code>true</code> to allow interfaces to be put in the replied list.
  @param allowEnum is <code>true</code> to allow enumeration to be put in the replied list.
  @param result is the list of subclasses which will be filled by this function.