Search in sources :

Example 21 with MuleModule

use of org.mule.runtime.container.api.MuleModule in project mule by mulesoft.

the class TestModuleDiscoverer method discover.

@Override
public List<MuleModule> discover() {
    DefaultModuleRepository containerModuleDiscoverer = new DefaultModuleRepository(delegateModuleDiscoverer);
    List<MuleModule> discoveredModules = containerModuleDiscoverer.getModules();
    List<MuleModule> updateModules = new ArrayList<>(discoveredModules.size());
    for (MuleModule discoveredModule : discoveredModules) {
        if (!discoveredModule.getPrivilegedExportedPackages().isEmpty()) {
            discoveredModule = updateModuleForTests(discoveredModule);
        }
        updateModules.add(discoveredModule);
    }
    return updateModules;
}
Also used : DefaultModuleRepository(org.mule.runtime.container.internal.DefaultModuleRepository) ArrayList(java.util.ArrayList) MuleModule(org.mule.runtime.container.api.MuleModule)

Aggregations

MuleModule (org.mule.runtime.container.api.MuleModule)21 ArrayList (java.util.ArrayList)12 Test (org.junit.Test)11 URL (java.net.URL)5 EnumerationAdapter (org.mule.runtime.core.internal.util.EnumerationAdapter)5 SmallTest (org.mule.tck.size.SmallTest)5 ArtifactClassLoader (org.mule.runtime.module.artifact.api.classloader.ArtifactClassLoader)4 LookupStrategy (org.mule.runtime.module.artifact.api.classloader.LookupStrategy)4 HashMap (java.util.HashMap)3 ModuleRepository (org.mule.runtime.container.api.ModuleRepository)3 ContainerOnlyLookupStrategy (org.mule.runtime.container.internal.ContainerOnlyLookupStrategy)3 ClassLoaderFilter (org.mule.runtime.module.artifact.api.classloader.ClassLoaderFilter)3 ClassLoaderLookupPolicy (org.mule.runtime.module.artifact.api.classloader.ClassLoaderLookupPolicy)3 HashSet (java.util.HashSet)2 LinkedList (java.util.LinkedList)2 Map (java.util.Map)2 ArtifactPluginDescriptor (org.mule.runtime.deployment.model.api.plugin.ArtifactPluginDescriptor)2 DelegateOnlyLookupStrategy (org.mule.runtime.module.artifact.api.classloader.DelegateOnlyLookupStrategy)2 ArtifactDescriptor (org.mule.runtime.module.artifact.api.descriptor.ArtifactDescriptor)2 IOException (java.io.IOException)1