private static void analyzeClass(String className, Detector detector) {
try {
pn("-------------------------------------------------");
pn("Class: " + className);
System.out.flush();
ClassFlow cf = null;
if (className.endsWith(".class")) {
FileInputStream fis = null;
try {
fis = new FileInputStream(className);
cf = new ClassFlow(fis, detector);
} finally {
if (fis != null) {fis.close();}
}
}
if (cf == null) {
cf = new ClassFlow(className, detector);
}
ArrayList<MethodFlow> flows = cf.analyze(true);
for (MethodFlow flow: flows) {
reportFlow(flow, className);
}
} catch (IOException e) {
pn("##################################################");