|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.loader.util.ASClassLoaderUtil
public class ASClassLoaderUtil
| Constructor Summary | |
|---|---|
ASClassLoaderUtil()
|
|
| Method Summary | |
|---|---|
static URL[] |
convertURLListToArray(List<URL> list)
|
static URL[] |
getAppLibDirLibraries(File appRoot,
String appLibDir,
String compatibilityProp)
add all the libraries packaged in the application library directory |
static List<URL> |
getAppLibDirLibrariesAsList(File appRoot,
String appLibDir,
String compatibilityProp)
|
static URL[] |
getDeployParamLibrariesAsURLs(String librariesStr,
ServerEnvironment env)
converts libraries specified via the --libraries deployment option to URL[]. |
static URL[] |
getLibrariesAsURLs(Set<String> librariesStr,
ServerEnvironment env)
converts libraries specified via EXTENSION_LIST entry in MANIFEST.MF of all of the libraries of the deployed archive to The libraries are made available to the application in the order specified. |
static Manifest |
getManifest(String rootPath)
Returns the manifest file for the given root path. |
static List<URL> |
getManifestClassPathAsURLs(Manifest manifest,
String rootPath)
Returns the class path (if any) from the given manifest file as an URL list. |
static String |
getModuleClassPath(org.jvnet.hk2.component.Habitat habitat,
DeploymentContext context)
|
static String |
getModuleClassPath(org.jvnet.hk2.component.Habitat habitat,
String moduleId,
String deploymentLibs)
Gets the classpath associated with a module, suffixing libraries defined [if any] for the application |
static URL[] |
getURLs(File[] dirs,
File[] jarDirs,
boolean ignoreZip)
Returns an array of urls that contains .. |
static List<URL> |
getURLsAsList(File[] dirs,
File[] jarDirs,
boolean ignoreZip)
Returns a list of urls that contains .. |
static List<URL> |
getURLsFromClasspath(String classpath,
String delimiter,
String rootPath)
get URL list from classpath |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ASClassLoaderUtil()
| Method Detail |
|---|
public static String getModuleClassPath(org.jvnet.hk2.component.Habitat habitat,
String moduleId,
String deploymentLibs)
habitat - the habitat the application resides in.moduleId - Module id of the moduledeploymentLibs - libraries option passed through deployment
File.pathSeparator separated list of classpaths
for the passed in module, including the module specified
"libraries" defined for the module.
public static String getModuleClassPath(org.jvnet.hk2.component.Habitat habitat,
DeploymentContext context)
public static URL[] getLibrariesAsURLs(Set<String> librariesStr,
ServerEnvironment env)
librariesStr - is a comma-separated list of library JAR filesenv - the server environment
public static URL[] getDeployParamLibrariesAsURLs(String librariesStr,
ServerEnvironment env)
librariesStr - is a comma-separated list of library JAR filesenv - the server environment
public static URL[] getURLs(File[] dirs,
File[] jarDirs,
boolean ignoreZip)
throws IOException
i. all the valid directories from the given directory (dirs) array
ii. all jar files from the given directory (jarDirs) array
iii. all zip files from the given directory (jarDirs) array if
not ignoring zip file (ignoreZip is false).
dirs - array of directory path namesjarDirs - array of path name to directories that contains
JAR & ZIP files.ignoreZip - whether to ignore zip files
IOException - if an i/o error while constructing the urls
public static List<URL> getURLsAsList(File[] dirs,
File[] jarDirs,
boolean ignoreZip)
throws IOException
i. all the valid directories from the given directory (dirs) array
ii. all jar files from the given directory (jarDirs) array
iii. all zip files from the given directory (jarDirs) array if
not ignoring zip file (ignoreZip is false).
dirs - array of directory path namesjarDirs - array of path name to directories that contains
JAR & ZIP files.ignoreZip - whether to ignore zip files
IOException - if an i/o error while constructing the urlspublic static URL[] convertURLListToArray(List<URL> list)
public static List<URL> getURLsFromClasspath(String classpath,
String delimiter,
String rootPath)
classpath - classpath string containing the classpathsdelimiter - delimiter to separate the classpath components
in the classpath stringrootPath - root path of the classpath if the paths are relative
public static Manifest getManifest(String rootPath)
rootPath - absolute path to the module
public static List<URL> getManifestClassPathAsURLs(Manifest manifest,
String rootPath)
manifest - manifest file of an archiverootPath - root path to the module
public static URL[] getAppLibDirLibraries(File appRoot,
String appLibDir,
String compatibilityProp)
throws IOException
appRoot - the application rootappLibDir - the Application library directorycompatibilityProp - the version of the release that we need to
maintain backward compatibility
IOException
public static List<URL> getAppLibDirLibrariesAsList(File appRoot,
String appLibDir,
String compatibilityProp)
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||