this.libDirectory = libDirectory;
this.url = libDirectory.getURL();
Iterator<IVirtualArtifact> artifacts = this.libDirectory.getArtifacts();
while (artifacts.hasNext()) {
IVirtualArtifact artifact = artifacts.next();
if (artifact instanceof IVirtualFile) {
if (ArchiveUtil.isArchive( (IVirtualFile) artifact )) {
if (artifact instanceof SystemFile) {
try {
this.add(new ZipClassSource( ((SystemFile)artifact).getRealArtifact() ));
} catch (Exception e) {
ThrowableManagerRegistry.caught(e);
log.warning("Could not load archive as class source: " + artifact);
}
} else {
try {
this.add(new InternalZipClassSource( artifact.getName(), ((IVirtualFile)artifact).getInputStream()));
} catch (IOException e) {
ThrowableManagerRegistry.caught(e);
log.warning("Could not load archive as class source: " + artifact);
}
}