8027481: jdeps to handle classes with the same package name and correct profile for javax.crypto.*

Reviewed-by: alanb, dfuchs
This commit is contained in:
Mandy Chung 2013-10-30 08:35:52 -07:00
parent 14d87a0e5a
commit fa729039be
8 changed files with 458 additions and 160 deletions

View file

@ -67,6 +67,7 @@ public class Archive {
deps.put(origin, set);
}
}
public void addClass(Location origin, Location target) {
Set<Location> set = deps.get(origin);
if (set == null) {
@ -76,21 +77,27 @@ public class Archive {
set.add(target);
}
public void visit(Visitor v) {
public Set<Location> getClasses() {
return deps.keySet();
}
public void visitDependences(Visitor v) {
for (Map.Entry<Location,Set<Location>> e: deps.entrySet()) {
v.visit(e.getKey());
for (Location target : e.getValue()) {
v.visit(e.getKey(), target);
}
}
}
public String toString() {
public String getPathName() {
return path != null ? path.toString() : filename;
}
public String toString() {
return filename;
}
interface Visitor {
void visit(Location loc);
void visit(Location origin, Location target);
}
}