Methods Summary |
---|
public void | addConfiguredRoot(org.apache.tools.ant.types.optional.depend.ClassfileSet$ClassRoot root)Add a nested root class definition to this class file set.
rootClasses.addElement(root.getClassname());
|
public void | addRootFileset(org.apache.tools.ant.types.FileSet rootFileSet)Add a fileset to which contains a collection of root classes used to
drive the search from classes.
rootFileSets.addElement(rootFileSet);
|
public java.lang.Object | clone()Clone this data type.
return new ClassfileSet(isReference()
? (ClassfileSet) (getRef(getProject())) : this);
|
public org.apache.tools.ant.DirectoryScanner | getDirectoryScanner(org.apache.tools.ant.Project p)Return the DirectoryScanner associated with this FileSet.
if (isReference()) {
return getRef(p).getDirectoryScanner(p);
}
Vector allRootClasses = (Vector) rootClasses.clone();
for (Enumeration e = rootFileSets.elements(); e.hasMoreElements();) {
FileSet additionalRootSet = (FileSet) e.nextElement();
DirectoryScanner additionalScanner
= additionalRootSet.getDirectoryScanner(p);
String[] files = additionalScanner.getIncludedFiles();
for (int i = 0; i < files.length; ++i) {
if (files[i].endsWith(".class")) {
String classFilePath
= files[i].substring(0, files[i].length() - 6);
String className
= classFilePath.replace('/", '.").replace('\\", '.");
allRootClasses.addElement(className);
}
}
}
DirectoryScanner parentScanner = super.getDirectoryScanner(p);
DependScanner scanner = new DependScanner(parentScanner);
scanner.setBasedir(getDir(p));
scanner.setRootClasses(allRootClasses);
scanner.scan();
return scanner;
|
public void | setRootClass(java.lang.String rootClass)Set the root class attribute.
rootClasses.addElement(rootClass);
|