com.mockrunner.gen.proc.GeneratorUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mockrunner-core Show documentation
Show all versions of mockrunner-core Show documentation
Core classes common to all Mockrunner modules
package com.mockrunner.gen.proc;
import java.io.File;
import java.util.Map;
public class GeneratorUtil
{
public void addJavaSrcFiles(String rootDir, File dir, Map resultMap)
{
File[] fileList = dir.listFiles();
for (File currentFile : fileList) {
if (currentFile.isDirectory()) {
addJavaSrcFiles(rootDir, currentFile, resultMap);
} else if (currentFile.isFile() && currentFile.getName().endsWith(".java")) {
String key = currentFile.getPath().substring(rootDir.length());
resultMap.put(key, currentFile);
}
}
}
}