compile problem fix
This commit is contained in:
parent
766da3d665
commit
54a7da07bb
3 changed files with 12 additions and 7 deletions
|
|
@ -40,6 +40,14 @@ public class GraphBuilder {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Graph build(File archive, String className) throws IOException {
|
||||||
|
return buildClassDepencyGraph(archive, className, new IncludeDecision() {
|
||||||
|
public boolean shouldIncludeClass(String name, String startingpointname) {
|
||||||
|
return name.equals(startingpointname);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds a graph for all classes (all included via package patterns and not excluded)
|
* Builds a graph for all classes (all included via package patterns and not excluded)
|
||||||
*
|
*
|
||||||
|
|
@ -56,7 +64,7 @@ public class GraphBuilder {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Graph buildClassDepencyGraph(File archiveFile, String className, IncludeDecision e) throws IOException {
|
private Graph buildClassDepencyGraph(File archiveFile, String className, IncludeDecision e) throws IOException {
|
||||||
List<InspectableClasspath> cpList = scanner.scanArchive(archiveFile);
|
List<InspectableClasspath> cpList = scanner.scanArchive(archiveFile);
|
||||||
|
|
||||||
ClassPool pool = ClassPool.getDefault();
|
ClassPool pool = ClassPool.getDefault();
|
||||||
|
|
|
||||||
|
|
@ -25,10 +25,8 @@ public class LargePackageTest {
|
||||||
GraphBuilder earBuilder = GraphBuilderFactory.getEarBuilder();
|
GraphBuilder earBuilder = GraphBuilderFactory.getEarBuilder();
|
||||||
earBuilder.setPackageIncludePatterns("");
|
earBuilder.setPackageIncludePatterns("");
|
||||||
earBuilder.setPackageExcludePatterns("java.*");
|
earBuilder.setPackageExcludePatterns("java.*");
|
||||||
Graph graph = earBuilder.buildClassDepencyGraph(config.getEarFile(),
|
Graph graph = earBuilder.build(config.getEarFile(), "java.lang.String");
|
||||||
"java.lang.String");
|
DotPrinter dotPrinter = new DotPrinter(new FileOutputStream("/tmp/example.dot"));
|
||||||
DotPrinter dotPrinter = new DotPrinter(new FileOutputStream(
|
|
||||||
"/tmp/example.dot"));
|
|
||||||
dotPrinter.print(graph);
|
dotPrinter.print(graph);
|
||||||
dotPrinter.close();
|
dotPrinter.close();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,8 +27,7 @@ public class TgzBuilderTest {
|
||||||
GraphBuilder tgzBuilder = GraphBuilderFactory.getDefaultTgzBuilder();
|
GraphBuilder tgzBuilder = GraphBuilderFactory.getDefaultTgzBuilder();
|
||||||
tgzBuilder.setPackageIncludePatterns("nl.*");
|
tgzBuilder.setPackageIncludePatterns("nl.*");
|
||||||
tgzBuilder.setPackageExcludePatterns("");
|
tgzBuilder.setPackageExcludePatterns("");
|
||||||
Graph graph = tgzBuilder.buildClassDepencyGraph(config.getTgzFile(),
|
Graph graph = tgzBuilder.build(config.getTgzFile(), "nl.jssl.jas.Main");
|
||||||
"nl.jssl.jas.Main");
|
|
||||||
|
|
||||||
ArrayList<String> names = new ArrayList<String>();
|
ArrayList<String> names = new ArrayList<String>();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue