logger.info("Analysing classfiles");
// Find and visit all classes
Map<String,Clazz> clazzMap = new HashMap<String, Clazz>();
Collection<File> classfiles = findFiles(compileTargetDir, ".class").values();
for (File f : classfiles) {
ScottyFindInterruptableMethodsVisitor visitor = new ScottyFindInterruptableMethodsVisitor();
InputStream is = new FileInputStream(f);
try {
ClassReader cr = new ClassReader(is);
cr.accept(visitor, 0);
}
finally {
is.close();
}
Clazz clazz = new Clazz();
clazz.interruptableMethods = visitor.getInterruptableMethods();
clazz.classfile = f;
clazz.classname = visitor.getClassname();
clazz.superClassname = visitor.getSuperClassname();
clazzMap.put(clazz.classname, clazz);
}
// Remove all classes that are no workflow
List<String> allClassNames = new ArrayList<String>(clazzMap.keySet());