use of org.hibernate.boot.archive.spi.JarFileEntryUrlAdjuster in project hibernate-orm by hibernate.
the class AbstractScannerImpl method buildArchiveDescriptor.
private ArchiveDescriptor buildArchiveDescriptor(URL url, ScanEnvironment environment, boolean isRootUrl) {
final ArchiveDescriptor descriptor;
final ArchiveDescriptorInfo descriptorInfo = archiveDescriptorCache.get(url);
if (descriptorInfo == null) {
if (!isRootUrl && archiveDescriptorFactory instanceof JarFileEntryUrlAdjuster) {
url = ((JarFileEntryUrlAdjuster) archiveDescriptorFactory).adjustJarFileEntryUrl(url, environment.getRootUrl());
}
descriptor = archiveDescriptorFactory.buildArchiveDescriptor(url);
archiveDescriptorCache.put(url, new ArchiveDescriptorInfo(descriptor, isRootUrl));
} else {
validateReuse(descriptorInfo, isRootUrl);
descriptor = descriptorInfo.archiveDescriptor;
}
return descriptor;
}
Aggregations