classpathDependencies = null;
Path checkPath = getCheckClassPath();
if (checkPath != null) {
// now determine which jars each class depends upon
classpathDependencies = new Hashtable();
AntClassLoader loader
= new AntClassLoader(getProject(), checkPath);
Hashtable classpathFileCache = new Hashtable();
Object nullFileMarker = new Object();
for (Enumeration e = dependencyMap.keys(); e.hasMoreElements();) {
String className = (String) e.nextElement();
Vector dependencyList = (Vector) dependencyMap.get(className);
Hashtable dependencies = new Hashtable();
classpathDependencies.put(className, dependencies);
Enumeration e2 = dependencyList.elements();
while (e2.hasMoreElements()) {
String dependency = (String) e2.nextElement();
Object classpathFileObject
= classpathFileCache.get(dependency);
if (classpathFileObject == null) {
classpathFileObject = nullFileMarker;
if (!dependency.startsWith("java.")
&& !dependency.startsWith("javax.")) {
URL classURL = loader.getResource(dependency.replace('.', '/') + ".class");
if (classURL != null) {
if (classURL.getProtocol().equals("jar")) {
String jarFilePath = classURL.getFile();
if (jarFilePath.startsWith("file:")) {
int classMarker = jarFilePath.indexOf('!');