private static void findClassesInPath(String classPath, String pkgName, Class<?> searchClass, HashSet<String> classNames) {

        // make sure the classPath is complete
        File cfile = new File(classPath);
        String absolutePath = cfile.getAbsolutePath();
        if (!classPath.equals(absolutePath)) {
            classPath = absolutePath;
        }
        if (!classPath.endsWith(File.separator)) {
            // append the separator so the substring works correctly
            // below when we build the class name to pass to the loader...
            classPath = classPath + File.separator;
        }
        String pkgPath = pkgName.replace('.', File.separatorChar);	
        classPath += pkgPath;

        File dir = new File(classPath);
        String []names = dir.list();
        
        if (names == null) {
            return; // not a directory
        }

        for (String name : names) {

            File f = new File(dir, name);
            String filename = f.getAbsolutePath();
            
            if (f.isDirectory() || !filename.endsWith(".class")) {
                continue;  // file is not a class file
            }

            // Make sure we use the class name and not
            // a filename so that the system can load it...
            // generate the class name to pass to loadClass(), so
            // use classPath to chop off the part we don't want in the
            // class name. 
            //
            String className = createClassName(filename, pkgName, File.separatorChar);
            if (!classNames.contains(className)) {
	            try {
	            	Class<?> c = Class.forName(className);
	            	if (isClassOfInterest(c, searchClass)) {
	            		classNames.add(className);
	            	}
	            } catch (Throwable t) {
	                // ignore linkage errors...
	                if (!(t instanceof LinkageError)) {
	                    System.out.println("Error loading class " +
	                                       filename + ", " + t);
	                }
	            }
            }
        }
    }
Find and add to classNames, all classes within the classpath and the specified package 
which extend or implement the specified searchClass.
@param classPath directory path that is from CLASSPATH
@param pkgName name of package
@param searchClass base or interface class to search for.
@param classNames set of unique class names
Ghidra/Framework/Generic/src/main/java/ghidra/util/TestSuiteUtilities.java