int phase = (config.getTargetDirectory() == null) ? Phases.CLASS_GENERATION : Phases.OUTPUT;
cu.compile(phase);
Map<Source,CompiledSourceInfo> compiledSourceInfos = new HashMap<Source,CompiledSourceInfo>();
for (Entry<Source, SourceUnit> entry : sourceUnitMap.entrySet()) {
Source source = entry.getKey();
SourceUnit su = entry.getValue();
Set<String> classNames = new HashSet<String>();
List<ClassNode> nodes = su.getAST().getClasses();
for (ClassNode node : nodes) {
classNames.add(node.getName());
}
CompiledSourceInfo compiledSourceInfo = new CompiledSourceInfo(source,
su.getAST().getMainClassName(), classNames, source.getLastModified());
//System.out.println("SU MainClassName: " + su.getAST().getMainClassName());
compiledSourceInfos.put(source, compiledSourceInfo);
}
@SuppressWarnings("unchecked")