use of org.mule.runtime.module.artifact.api.classloader.MuleDeployableArtifactClassLoader in project mule by mulesoft.
the class PolicyTemplateClassLoaderFactory method create.
@Override
public ArtifactClassLoader create(String artifactId, ArtifactClassLoader parent, PolicyTemplateDescriptor descriptor, List<ArtifactClassLoader> artifactPluginClassLoaders) {
File rootFolder = descriptor.getRootFolder();
if (rootFolder == null || !rootFolder.exists()) {
throw new IllegalArgumentException("Policy folder does not exists: " + (rootFolder != null ? rootFolder.getName() : null));
}
final ClassLoaderLookupPolicy classLoaderLookupPolicy = parent.getClassLoaderLookupPolicy();
MuleDeployableArtifactClassLoader deployableArtifactClassLoader = new MuleDeployableArtifactClassLoader(artifactId, descriptor, descriptor.getClassLoaderModel().getUrls(), parent.getClassLoader(), classLoaderLookupPolicy, artifactPluginClassLoaders);
return deployableArtifactClassLoader;
}
Aggregations