if (classpath != null)
fm.setLocation(StandardLocation.CLASS_PATH, classpath);
ClassFileReader reader = new ClassFileReader(fm);
Dependencies d = new Dependencies();
if (regex != null)
d.setFilter(Dependencies.getRegexFilter(Pattern.compile(regex)));
if (packageNames.size() > 0)
d.setFilter(Dependencies.getPackageFilter(packageNames, false));
SortedRecorder r = new SortedRecorder(reverse);
d.findAllDependencies(reader, rootClassNames, transitiveClosure, r);
SortedMap<Location,SortedSet<Dependency>> deps = r.getMap();
for (Map.Entry<Location, SortedSet<Dependency>> e: deps.entrySet()) {
out.println(e.getKey());
for (Dependency dep: e.getValue()) {