public class TomcatWebAppClassLoader
extends org.apache.catalina.loader.WebappClassLoader
Modifier and Type | Field and Description |
---|---|
protected ModuleClassLoader[] |
theDependencyClassLoaders
The set of ModuleClassLoaders from the dependent Modules.
|
allPermission, delegate, loaderPC, needConvert, packageTriggersDeny, packageTriggersPermit, parent, permissionList, resourceEntries, resources, securityManager, sm, started
AFTER_DESTROY_EVENT, AFTER_INIT_EVENT, AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_DESTROY_EVENT, BEFORE_INIT_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, CONFIGURE_START_EVENT, CONFIGURE_STOP_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT
Constructor and Description |
---|
TomcatWebAppClassLoader(ClassLoader parent) |
Modifier and Type | Method and Description |
---|---|
URL |
findResource(String name)
Find a URL.
|
URL |
getResource(String name)
Find a resource through this ClassLoader.
|
InputStream |
getResourceAsStream(String name)
Find the resource with the given name, and return an input stream
that can be used for reading it.
|
Enumeration<URL> |
getResources(String name)
Obtain an Enumeration of Resources.
|
URL[] |
getURLs()
Obtain the JAR URLs for this ClassLoader.
|
void |
initialize(Module[] dependencies)
Initialize with the parameters given.
|
Class |
loadClass(String name,
boolean resolve)
Load a Class.
|
String |
toString()
For debugging.
|
addLifecycleListener, addTransformer, addURL, clearReferences, copyWithoutTransformers, destroy, doDefineClass, filter, findClass, findClassInternal, findLifecycleListeners, findLoadedClass0, findLoadedResource, findResourceInternal, findResources, getClearReferencesHttpClientKeepAliveThread, getClearReferencesLogFactoryRelease, getClearReferencesStatic, getClearReferencesStopThreads, getClearReferencesStopTimerThreads, getContextName, getDelegate, getJavaseClassLoader, getPermissions, getResources, getState, getStateName, init, isPackageSealed, isStarted, loadClass, modified, refreshPolicy, removeLifecycleListener, removeTransformer, setClearReferencesHttpClientKeepAliveThread, setClearReferencesLogFactoryRelease, setClearReferencesStatic, setClearReferencesStopThreads, setClearReferencesStopTimerThreads, setDelegate, setJavaseClassLoader, setResources, start, stop, validate
close, definePackage, newInstance, newInstance
defineClass, defineClass
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
protected ModuleClassLoader[] theDependencyClassLoaders
public TomcatWebAppClassLoader(ClassLoader parent)
public void initialize(Module[] dependencies) throws MalformedURLException
dependencies
- the list of Module dependencies for this web appMalformedURLException
- thrown if one of the URLs identifying the Module's JAR files is malformedpublic URL[] getURLs()
getURLs
in class org.apache.catalina.loader.WebappClassLoader
public URL getResource(String name)
getResource
in class org.apache.catalina.loader.WebappClassLoader
name
- name of the resource to findpublic Enumeration<URL> getResources(String name) throws IOException
getResources
in class ClassLoader
name
- the name of the ResourceIOException
- thrown if an I/O error occurredpublic InputStream getResourceAsStream(String name)
getResourceAsStream
in class org.apache.catalina.loader.WebappClassLoader
name
- Name of the resource to return an input stream forpublic Class loadClass(String name, boolean resolve) throws ClassNotFoundException
loadClass
in class org.apache.catalina.loader.WebappClassLoader
name
- name of the to-be-loaded classresolve
- do we also resolve the classClassNotFoundException
- loading the class failed, it could not be foundpublic URL findResource(String name)
findResource
in class org.apache.catalina.loader.WebappClassLoader
name
- the name of the resourcepublic String toString()
toString
in class org.apache.catalina.loader.WebappClassLoader
Copyright © 2018. All rights reserved.