private static void analyze(String className, List<String> classPath) throws RuntimeException,
ClassNotFoundException {
if (!inheritanceTree.hasClass(Properties.TARGET_CLASS)) {
throw new ClassNotFoundException("Target class not found in inheritance tree");
}
logger.debug("Calculate call tree");
CallGraph callGraph = CallGraphGenerator.analyze(className);
callGraphs.put(className, callGraph);
loadCallTreeClasses(callGraph);
if (ArrayUtil.contains(Properties.CRITERION, Criterion.IBRANCH)
|| Properties.INSTRUMENT_CONTEXT) {
for (String classn : inheritanceTree.getAllClasses()) {
if (isTargetProject(classn)) {
CallGraphGenerator.analyzeOtherClasses(callGraph, classn);
}
}
}
logger.debug("Update call tree with calls to overridden methods");
CallGraphGenerator.update(callGraph, inheritanceTree);
logger.debug("Create test cluster");
TestGenerationContext.getInstance().getTestClusterGenerator().generateCluster(callGraph);
gatherStatistics();
}