@ManagedObject public class CachingWebAppClassLoader extends WebAppClassLoader
getResource(String) results.
Specifically this ClassLoader caches not found classes and resources,
which can greatly increase performance for applications that search
for resources.WebAppClassLoader.Context| Constructor and Description |
|---|
CachingWebAppClassLoader(ClassLoader parent,
WebAppClassLoader.Context context) |
CachingWebAppClassLoader(WebAppClassLoader.Context context) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearCache() |
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.
|
Class<?> |
loadClass(String name) |
String |
toString() |
addClassFileTransformer, addClassPath, addClassPath, addJars, addTransformer, close, findClass, foundClass, getContext, getName, getPermissions, getResources, loadClass, removeClassFileTransformer, removeTransformer, runWithServerClassAccess, setNameaddURL, definePackage, findResource, findResources, getResourceAsStream, getURLs, newInstance, newInstancedefineClass, defineClassclearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSignerspublic CachingWebAppClassLoader(ClassLoader parent, WebAppClassLoader.Context context) throws IOException
IOExceptionpublic CachingWebAppClassLoader(WebAppClassLoader.Context context) throws IOException
IOExceptionpublic URL getResource(String name)
WebAppClassLoadergetResource in class WebAppClassLoaderpublic Class<?> loadClass(String name) throws ClassNotFoundException
loadClass in class ClassLoaderClassNotFoundException@ManagedOperation public void clearCache()
public String toString()
toString in class WebAppClassLoaderCopyright © 1995–2017 Webtide. All rights reserved.