Scanner scanner = null;
File f = new File(abstractArchive.getArchiveUri());
if (ModuleType.EJB.equals(archivist.getModuleType())) {
scanner = new EjbJarScanner(f, (EjbBundleDescriptor)bundleDesc,
classLoader);
} else if (ModuleType.WAR.equals(archivist.getModuleType())) {
scanner = new WarScanner(f, (WebBundleDescriptor)bundleDesc,
classLoader);
} else if (ModuleType.CAR.equals(archivist.getModuleType())) {
ApplicationClientDescriptor appClientDesc =
(ApplicationClientDescriptor)bundleDesc;
scanner = new AppClientScanner(f, appClientDesc, classLoader);
}
return scanner;