use of org.mule.runtime.container.internal.MuleClassLoaderLookupPolicy in project mule by mulesoft.
the class TestContainerClassLoaderFactory method createContainerClassLoader.
/**
* Overrides method due to it has to use the {@link ClassLoader} set to this factory in order to discover modules.
*
* @param parentClassLoader parent classLoader. Can be null.
* @return a non null {@link ArtifactClassLoader} containing container code that can be used as parent classloader for other
* mule artifacts.
*/
@Override
public ArtifactClassLoader createContainerClassLoader(final ClassLoader parentClassLoader) {
final List<MuleModule> muleModules = withContextClassLoader(classLoader, () -> testContainerModuleRepository.getModules());
MuleClassLoaderLookupPolicy lookupPolicy = new MuleClassLoaderLookupPolicy(Collections.emptyMap(), getBootPackages());
return createArtifactClassLoader(parentClassLoader, muleModules, lookupPolicy, new ArtifactDescriptor("mule"));
}
Aggregations