|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjava.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
org.eclipse.jetty.webapp.WebAppClassLoader
public class WebAppClassLoader
ClassLoader for HttpContext.
Specializes URLClassLoader with some utility and file mapping
methods.
This loader defaults to the 2.3 servlet spec behavior where non
system classes are loaded from the classpath in preference to the
parent loader. Java2 compliant loading, where the parent loader
always has priority, can be selected with the
WebAppContext.setParentLoaderPriority(boolean)
method and influenced with WebAppContext.isServerClass(String) and
WebAppContext.isSystemClass(String).
If no parent class loader is provided, then the current thread
context classloader will be used. If that is null then the
classloader that loaded this class is used as the parent.
| 嵌套类摘要 | |
|---|---|
static interface |
WebAppClassLoader.Context
The Context in which the classloader operates. |
| 构造方法摘要 | |
|---|---|
WebAppClassLoader(ClassLoader parent,
WebAppClassLoader.Context context)
Constructor. |
|
WebAppClassLoader(WebAppClassLoader.Context context)
Constructor. |
|
| 方法摘要 | |
|---|---|
void |
addClassPath(Resource resource)
|
void |
addClassPath(String classPath)
|
void |
addJars(Resource lib)
Add elements to the class path for the context from the jar and zip files found in the specified resource. |
WebAppClassLoader.Context |
getContext()
|
String |
getName()
|
PermissionCollection |
getPermissions(CodeSource cs)
|
URL |
getResource(String name)
Get a resource from the classloader NOTE: this method provides a convenience of hacking off a leading / should one be present. |
Enumeration<URL> |
getResources(String name)
|
Class<?> |
loadClass(String name)
|
protected Class<?> |
loadClass(String name,
boolean resolve)
|
void |
setName(String name)
|
String |
toString()
|
| 从类 java.net.URLClassLoader 继承的方法 |
|---|
addURL, definePackage, findClass, findResource, findResources, getURLs, newInstance, newInstance |
| 从类 java.security.SecureClassLoader 继承的方法 |
|---|
defineClass, defineClass |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| 构造方法详细信息 |
|---|
public WebAppClassLoader(WebAppClassLoader.Context context)
throws IOException
IOException
public WebAppClassLoader(ClassLoader parent,
WebAppClassLoader.Context context)
throws IOException
IOException| 方法详细信息 |
|---|
public String getName()
public void setName(String name)
name - the name of the classloaderpublic WebAppClassLoader.Context getContext()
public void addClassPath(Resource resource)
throws IOException
resource - Comma or semicolon separated path of filenames or URLs
pointing to directories or jar files. Directories should end
with '/'.
IOException
public void addClassPath(String classPath)
throws IOException
classPath - Comma or semicolon separated path of filenames or URLs
pointing to directories or jar files. Directories should end
with '/'.
IOExceptionpublic void addJars(Resource lib)
lib - the resource that contains the jar and/or zip files.public PermissionCollection getPermissions(CodeSource cs)
URLClassLoader 中的 getPermissions
public Enumeration<URL> getResources(String name)
throws IOException
ClassLoader 中的 getResourcesIOExceptionpublic URL getResource(String name)
ClassLoader 中的 getResource
public Class<?> loadClass(String name)
throws ClassNotFoundException
ClassLoader 中的 loadClassClassNotFoundException
protected Class<?> loadClass(String name,
boolean resolve)
throws ClassNotFoundException
ClassLoader 中的 loadClassClassNotFoundExceptionpublic String toString()
Object 中的 toString
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||