PrintStream errorStream = new PrintStream(new FileOutputStream(
new File(reportDirectory, TestabilityConstants.ERROR_LOG_FILENAME)));
RegExpWhiteList whitelist = new RegExpWhiteList("java.");
for (String packageName : whitelistPackages) {
whitelist.addPackage(packageName);
}
CostModel costModel = new CostModel(cyclomaticCost, globalCost, constructorMultiplier);
JavaClassRepository classRepository = new JavaClassRepository(classPath);
MetricComputer computer = new MetricComputer(classRepository, errorStream, whitelist, printDepth);