final String classExt = ".class";
for (Enumeration<JarEntry> entries = moduleJar.entries(); entries.hasMoreElements();) {
JarEntry je = entries.nextElement();
if (je.getName().endsWith(classExt)) {
String className = Util.convertToExternalClassName(je.getName().substring(0, je.getName().length() - classExt.length()));
ClassFile cf = null;
try {
cf = cfl.load(className);
for (String c : cf.getAllReferencedClassNames()) {
requiredPkgs.add(Util.getPackageName(c));
}
} catch (IOException e) {
logger.logp(Level.FINE, "PackageAnalyser", "computeRequiredPackages", "Skipping analysis of {0} as the following exception was thrown:\n {1}", new Object[]{className, e});
}