return factory;
}
public static Set<String> getClassNamesFromURL(URL url, ClassLoader loader, Map properties) {
Set<String> classNames = new HashSet<String>();
Archive archive = null;
try {
archive = PersistenceUnitProcessor.getArchiveFactory(loader).createArchive(url, properties);
if (archive != null) {
for (Iterator<String> entries = archive.getEntries(); entries.hasNext();) {
String entry = entries.next();
if (entry.endsWith(".class")){ // NOI18N
classNames.add(buildClassNameFromEntryString(entry));
}
}
}
} catch (URISyntaxException e) {
throw new RuntimeException("url = [" + url + "]", e); // NOI18N
} catch (IOException e) {
throw new RuntimeException("url = [" + url + "]", e); // NOI18N
} finally {
if (archive != null) {
archive.close();
}
}
return classNames;
}