org.apache.catalina.startup
public final class ClassLoaderFactory extends Object
Utility class for building class loaders for Catalina. The factory method requires the following parameters in order to build a new class loader (with suitable defaults in all cases):
ClassLoader
instance that should become the parent of
the new class loader.Version: $Revision: 832158 $ $Date: 2009-11-02 23:28:35 +0100 (Mon, 02 Nov 2009) $
Field Summary | |
---|---|
protected static Integer | IS_DIR |
protected static Integer | IS_GLOB |
protected static Integer | IS_JAR |
protected static Integer | IS_URL |
Method Summary | |
---|---|
static ClassLoader | createClassLoader(File[] unpacked, File[] packed, ClassLoader parent)
Create and return a new class loader, based on the configuration
defaults and the specified directory paths:
|
static ClassLoader | createClassLoader(File[] unpacked, File[] packed, URL[] urls, ClassLoader parent)
Create and return a new class loader, based on the configuration
defaults and the specified directory paths:
|
static ClassLoader | createClassLoader(String[] locations, Integer[] types, ClassLoader parent)
Create and return a new class loader, based on the configuration
defaults and the specified directory paths:
|
Parameters: unpacked Array of pathnames to unpacked directories that should
be added to the repositories of the class loader, or null
for no unpacked directories to be considered packed Array of pathnames to directories containing JAR files
that should be added to the repositories of the class loader,
or null
for no directories of JAR files to be considered parent Parent class loader for the new class loader, or
null
for the system class loader.
Throws: Exception if an error occurs constructing the class loader
Parameters: unpacked Array of pathnames to unpacked directories that should
be added to the repositories of the class loader, or null
for no unpacked directories to be considered packed Array of pathnames to directories containing JAR files
that should be added to the repositories of the class loader,
or null
for no directories of JAR files to be considered urls Array of URLs to remote repositories, designing either JAR
resources or uncompressed directories that should be added to
the repositories of the class loader, or null
for no
directories of JAR files to be considered parent Parent class loader for the new class loader, or
null
for the system class loader.
Throws: Exception if an error occurs constructing the class loader
Parameters: locations Array of strings containing class directories, jar files,
jar directories or URLS that should be added to the repositories of
the class loader. The type is given by the member of param types. types Array of types for the members of param locations.
Possible values are IS_DIR (class directory), IS_JAR (single jar file),
IS_GLOB (directory of jar files) and IS_URL (URL). parent Parent class loader for the new class loader, or
null
for the system class loader.
Throws: Exception if an error occurs constructing the class loader