public boolean hasClasspathVisibilityTo(Archive other, Set visited, EARFile ear) { if (this == other) return true; if (visited.contains(this)) return false; visited.add(this); String[] mfEntries = getManifest().getClassPathTokenized(); for (int i = 0; i < mfEntries.length; i++) { Archive anArchive = getResolvedArchive(mfEntries[i], ear); if (anArchive != null && anArchive.hasClasspathVisibilityTo(other, visited, ear)) return true; } return false; }
public boolean hasDirectOrIndirectDependencyTo(IProject archiveProject) { ClasspathElement element = getClasspathElement(archiveProject); if (element == null) return false; Archive anArchive = null; if (element.isValid()) { try { anArchive = (Archive) getEARFile().getFile(element.getText()); } catch (FileNotFoundException e) { } } return anArchive != null && archive.hasClasspathVisibilityTo(anArchive); }
public boolean hasDirectOrIndirectDependencyTo(String jarName) { ClasspathElement element = getClasspathElement(jarName); if (element == null) return false; Archive anArchive = null; if (element.isValid()) { try { anArchive = (Archive) getEARFile().getFile(element.getText()); } catch (FileNotFoundException e) { } } return anArchive != null && archive.hasClasspathVisibilityTo(anArchive); }