* @exception IllegalStateException when basedir was set incorrectly.
*/
public synchronized void scan() throws IllegalStateException {
included = new Vector();
String analyzerClassName = DEFAULT_ANALYZER_CLASS;
DependencyAnalyzer analyzer = null;
try {
Class analyzerClass = Class.forName(analyzerClassName);
analyzer = (DependencyAnalyzer) analyzerClass.newInstance();
} catch (Exception e) {
throw new BuildException("Unable to load dependency analyzer: "
+ analyzerClassName, e);
}
analyzer.addClassPath(new Path(null, basedir.getPath()));
for (Enumeration e = additionalBaseDirs.elements(); e.hasMoreElements();) {
File additionalBaseDir = (File) e.nextElement();
analyzer.addClassPath(new Path(null, additionalBaseDir.getPath()));
}
for (Enumeration e = rootClasses.elements(); e.hasMoreElements();) {
String rootClass = (String) e.nextElement();
analyzer.addRootClass(rootClass);
}
Enumeration e = analyzer.getClassDependencies();
String[] parentFiles = parentScanner.getIncludedFiles();
Hashtable parentSet = new Hashtable();
for (int i = 0; i < parentFiles.length; ++i) {
parentSet.put(parentFiles[i], parentFiles[i]);