for (String sourcePath : StrUtils.parse(args[3], IConstants.COMMA)) {
sourceDirs.add(new File(sourcePath));
}
final File outputFile = new File(args[4]);
Digest digest = new Digest(new ZipFile(digestFile));
DigestBasedSequenceDiagramGenerator gen = new DigestBasedSequenceDiagramGenerator(
digest);
DigestBasedSequenceDiagramContext ctx = new DigestBasedSequenceDiagramContext();
ctx.setFilters(filters);
ctx.setFollowInvokedMethods(true);
ctx.setShowInstructions(false);
ctx.setShowSourceCode(true);
ctx.setSrcCodeManager(new SourceCodeManager(sourceDirs
.toArray(IConstants.ZERO_LENGTH_FILE_ARRAY)));
ctx.setClassName(className);
// Create a temporary directory under which the diagrams will be
// generated.
final File tempDir = new File(IConstants.JAVA_IO_TMPDIR_PATH, UUID
.randomUUID().toString());
try {
if (!tempDir.mkdirs()) {
throw new IOException(
"Could not create temporary directory - "
+ tempDir.getAbsolutePath());
}
Set<MethodInfo> methods = digest.load(className).keySet();
for (MethodInfo method : methods) {
ctx.setMethod(method);
try {
// Generate the sequence diagram specification.
final String sequenceDiagramSpec = gen