/** * Given a list of module names, return a {@link ClassLoader} that combines all module loaders. This method was made * default to ensure API compatibility in WildFly. Implementations that are meant to provide support for multiple modules * must override this default method implementation, which uses only the first module found in the list. * * @param modules the set of modules for which we want a {@link ClassLoader}. * @return the combined {@link ClassLoader} */ default ClassLoader get(List<String> modules) { if (modules != null && modules.size() > 0) { return this.get(modules.get(0)); } return null; } }
moduleCL = locator.get(jbossModuleName);
private <T> MappingContext<T> generateMappingContext(MappingContext<T> mc, MappingInfo rmi) { ClassLoader moduleCL = null; List<String> jbossModuleNames = rmi.getJBossModuleNames(); if(!jbossModuleNames.isEmpty()) { ClassLoaderLocator cll = ClassLoaderLocatorFactory.get(); if(cll != null) { moduleCL = cll.get(jbossModuleNames); } } MappingModuleEntry[] mpe = rmi.getMappingModuleEntry(); ArrayList<MappingProvider<T>> al = new ArrayList<MappingProvider<T>>(); for(int i = 0 ; i < mpe.length; i++) { MappingProvider<T> mp = getMappingProvider(moduleCL, mpe[i]); if(mp != null) { al.add(mp); } } return new MappingContext<T>(al); }
moduleCL = locator.get(jbossModule);
moduleCL = locator.get(jbossModule);
if(cll != null) moduleCL = cll.get(jbossModuleNames);
if(cll != null) moduleCL = cll.get(jbossModuleNames);
if( cll != null) moduleCL = cll.get(jbossModuleNames);
moduleCL = locator.get(jbossModuleNames);
if(theCLL != null) ClassLoader newTCCL = theCLL.get(jbossModuleNames); if(newTCCL != null)