/** * Gets the classpath associated with a module, suffixing libraries * defined [if any] for the application * * @param habitat the habitat the application resides in. * @param moduleId Module id of the module * @param deploymentLibs libraries option passed through deployment * @return A <code>File.pathSeparator</code> separated list of classpaths * for the passed in module, including the module specified * "libraries" defined for the module. */ public static String getModuleClassPath (Habitat habitat, String moduleId, String deploymentLibs) { if (_logger.isLoggable(Level.FINE)) { _logger.log(Level.FINE, "ASClassLoaderUtil.getModuleClassPath " + "for module Id : " + moduleId); } StringBuilder classpath = new StringBuilder(getModulesClasspath(habitat)); ClassLoaderHierarchy clh = habitat.getByContract(ClassLoaderHierarchy.class); final String commonClassPath = clh.getCommonClassPath(); if (commonClassPath != null && commonClassPath.length() > 0) { classpath.append(commonClassPath).append(File.pathSeparator); } addDeployParamLibrariesForModule(classpath, moduleId, deploymentLibs, habitat); if (_logger.isLoggable(Level.FINE)) { _logger.log(Level.FINE, "Final classpath: " + classpath.toString()); } return classpath.toString(); }