|
||||||||||
| 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 java.net.URL[] |
convertURLListToArray(java.util.List<java.net.URL> list)
|
static java.net.URL[] |
getAppLibDirLibraries(java.io.File appRoot,
java.lang.String appLibDir,
java.lang.String compatibilityProp)
add all the libraries packaged in the application library directory |
static java.util.List<java.net.URL> |
getAppLibDirLibrariesAsList(java.io.File appRoot,
java.lang.String appLibDir,
java.lang.String compatibilityProp)
|
static java.net.URL[] |
getDeployParamLibrariesAsURLs(java.lang.String librariesStr,
ServerEnvironment env)
converts libraries specified via the --libraries deployment option to URL[]. |
static java.net.URL[] |
getLibrariesAsURLs(java.util.Set<java.lang.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 java.util.jar.Manifest |
getManifest(java.lang.String rootPath)
Returns the manifest file for the given root path. |
static java.util.List<java.net.URL> |
getManifestClassPathAsURLs(java.util.jar.Manifest manifest,
java.lang.String rootPath)
Returns the class path (if any) from the given manifest file as an URL list. |
static java.lang.String |
getModuleClassPath(org.jvnet.hk2.component.Habitat habitat,
DeploymentContext context)
|
static java.lang.String |
getModuleClassPath(org.jvnet.hk2.component.Habitat habitat,
java.lang.String moduleId,
java.lang.String deploymentLibs)
Gets the classpath associated with a module, suffixing libraries defined [if any] for the application |
static java.net.URL[] |
getURLs(java.io.File[] dirs,
java.io.File[] jarDirs,
boolean ignoreZip)
Returns an array of urls that contains .. |
static java.util.List<java.net.URL> |
getURLsAsList(java.io.File[] dirs,
java.io.File[] jarDirs,
boolean ignoreZip)
Returns a list of urls that contains .. |
static java.util.List<java.net.URL> |
getURLsFromClasspath(java.lang.String classpath,
java.lang.String delimiter,
java.lang.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 java.lang.String getModuleClassPath(org.jvnet.hk2.component.Habitat habitat,
java.lang.String moduleId,
java.lang.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 java.lang.String getModuleClassPath(org.jvnet.hk2.component.Habitat habitat,
DeploymentContext context)
public static java.net.URL[] getLibrariesAsURLs(java.util.Set<java.lang.String> librariesStr,
ServerEnvironment env)
librariesStr - is a comma-separated list of library JAR filesenv - the server environment
public static java.net.URL[] getDeployParamLibrariesAsURLs(java.lang.String librariesStr,
ServerEnvironment env)
librariesStr - is a comma-separated list of library JAR filesenv - the server environment
public static java.net.URL[] getURLs(java.io.File[] dirs,
java.io.File[] jarDirs,
boolean ignoreZip)
throws java.io.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
java.io.IOException - if an i/o error while constructing the urls
public static java.util.List<java.net.URL> getURLsAsList(java.io.File[] dirs,
java.io.File[] jarDirs,
boolean ignoreZip)
throws java.io.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
java.io.IOException - if an i/o error while constructing the urlspublic static java.net.URL[] convertURLListToArray(java.util.List<java.net.URL> list)
public static java.util.List<java.net.URL> getURLsFromClasspath(java.lang.String classpath,
java.lang.String delimiter,
java.lang.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 java.util.jar.Manifest getManifest(java.lang.String rootPath)
rootPath - absolute path to the module
public static java.util.List<java.net.URL> getManifestClassPathAsURLs(java.util.jar.Manifest manifest,
java.lang.String rootPath)
manifest - manifest file of an archiverootPath - root path to the module
public static java.net.URL[] getAppLibDirLibraries(java.io.File appRoot,
java.lang.String appLibDir,
java.lang.String compatibilityProp)
throws java.io.IOException
appRoot - the application rootappLibDir - the Application library directorycompatibilityProp - the version of the release that we need to
maintain backward compatibility
java.io.IOException
public static java.util.List<java.net.URL> getAppLibDirLibrariesAsList(java.io.File appRoot,
java.lang.String appLibDir,
java.lang.String compatibilityProp)
throws java.io.IOException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||