@Override
	public Iterable<JavaFileObject> list(Location location, String packageName, Set<Kind> kinds,
			boolean recurse) throws IOException {

		if (location.equals(StandardLocation.SOURCE_PATH)) {
			String relativePath = packageName.replace('.', '/');
			List<JavaFileObject> newResult = new ArrayList<>();
			for (ResourceFile sourceDir : sourceDirs) {
				ResourceFile packageDir =
					relativePath.isEmpty() ? sourceDir : new ResourceFile(sourceDir, relativePath);
				if (packageDir.isDirectory()) {
					gatherFiles(sourceDir, packageDir, newResult, kinds, recurse);
				}
			}
			return newResult;
		}
		return fileManager.list(location, packageName, kinds, recurse);
	}
Create a {@link JavaFileManager} for use by the {@link JavaCompiler}.

@param sourceDirs the directories containing source
@param filesToAvoid known "bad" files to hide from the compiler
Ghidra/Features/Base/src/main/java/ghidra/app/script/ResourceFileJavaFileManager.java