String[] classFiles = getClassFileNames();
if (classFiles.length > 0 && _title == null)
{
_title = classFiles[0];
}
Analyser analyser = new Analyser(classFiles, getPattern(),
getReflectionPattern(),
isMergeInnerClasses());
try
{
analyser.readAndAnalyse(_packagesOnly);
PrintWriter writer = new PrintWriter(new FileWriter(_reportFile));
if (_reportType.equals(TYPE_XML))
{
analyser.printXML(_title, _packagesOnly, writer);
} else if (_reportType.equals(TYPE_CSV))
{
analyser.printCSV(writer);
} else if (_reportType.equals(TYPE_RAW))
{
analyser.printRaw(writer);
}
} catch (Exception e)
{
throw new BuildException(e);
}