org.mortbay.jetty.webapp
public class WebAppClassLoader extends URLClassLoader
WebAppContext.setParentLoaderPriority(boolean)
method.
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.Constructor and Description |
---|
WebAppClassLoader(ClassLoader parent,
WebAppContext context)
Constructor.
|
WebAppClassLoader(WebAppContext context)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
void |
destroy() |
ContextHandler |
getContext() |
String |
getName() |
PermissionCollection |
getPermissions(CodeSource cs) |
URL |
getResource(String name) |
boolean |
isServerPath(String name) |
boolean |
isSystemPath(String name) |
Class |
loadClass(String name) |
protected Class |
loadClass(String name,
boolean resolve) |
void |
setName(String name) |
String |
toString() |
addURL, definePackage, findClass, findResource, findResources, getURLs, newInstance, newInstance
defineClass, defineClass
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
public WebAppClassLoader(WebAppContext context) throws IOException
IOException
public WebAppClassLoader(ClassLoader parent, WebAppContext context) throws IOException
IOException
public String getName()
public void setName(String name)
name
- the name of the classloaderpublic ContextHandler getContext()
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 '/'.IOException
public void addJars(Resource lib)
lib
- the resource that contains the jar and/or zip files.append
- true if the classpath entries are to be appended to any
existing classpath, or false if they replace the existing classpath.#setClassPath(String)
public void destroy()
public PermissionCollection getPermissions(CodeSource cs)
getPermissions
in class URLClassLoader
public URL getResource(String name)
getResource
in class ClassLoader
public boolean isServerPath(String name)
public boolean isSystemPath(String name)
public Class loadClass(String name) throws ClassNotFoundException
loadClass
in class ClassLoader
ClassNotFoundException
protected Class loadClass(String name, boolean resolve) throws ClassNotFoundException
loadClass
in class ClassLoader
ClassNotFoundException
Copyright © 2009 Mortbay Consulting Pty. Ltd. All Rights Reserved.