Class WebAppClassLoader
java.lang.Object
java.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
org.eclipse.jetty.ee.webapp.WebAppClassLoader
org.eclipse.jetty.ee10.webapp.WebAppClassLoader
- All Implemented Interfaces:
Closeable
,AutoCloseable
,ClassVisibilityChecker
@Deprecated(since="12.0.0",
forRemoval=true)
public class WebAppClassLoader
extends WebAppClassLoader
Deprecated, for removal: This API element is subject to removal in a future version.
ClassLoader for HttpContext.
Specializes URLClassLoader with some utility and file mapping methods.
This loader implements the Servlet specification behavior that may invert the normal Java classloader parent priority
behaviour. The ClassVisibilityChecker
API of the WebAppClassLoader.Context
implementation is
used to determine which classes from the parent classloader are hidden from the context, and which are protected
from being overridden by the context.
Java compliant loading, where the parent loader always has priority, can be selected with the
WebAppContext.setParentLoaderPriority(boolean)
method.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jetty.ee.webapp.WebAppClassLoader
WebAppClassLoader.Context
-
Constructor Summary
ConstructorsConstructorDescriptionWebAppClassLoader
(ClassLoader parent, WebAppClassLoader.Context context) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
Deprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class org.eclipse.jetty.ee.webapp.WebAppClassLoader
addClassPath, addClassPath, addJars, addTransformer, close, findClass, foundClass, getContext, getName, getPermissions, getResource, getResources, isHiddenClass, isProtectedClass, loadAsResource, loadClass, removeTransformer, runWithHiddenClassAccess, setName, toString
Methods inherited from class java.net.URLClassLoader
addURL, definePackage, findResource, findResources, getResourceAsStream, getURLs, newInstance, newInstance
Methods inherited from class java.security.SecureClassLoader
defineClass, defineClass
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getPackage, getPackages, getParent, getPlatformClassLoader, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.jetty.util.ClassVisibilityChecker
isServerClass, isSystemClass
-
Constructor Details
-
WebAppClassLoader
Deprecated, for removal: This API element is subject to removal in a future version. -
WebAppClassLoader
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
runWithServerClassAccess
@Deprecated(since="12.1.0", forRemoval=true) public static <T> T runWithServerClassAccess(PrivilegedExceptionAction<T> action) throws Exception Deprecated, for removal: This API element is subject to removal in a future version.Run an action with access to ServerClassesRun the passed
PrivilegedExceptionAction
with the classloader configured so as to allow server classes to be visible- Type Parameters:
T
- the type of PrivilegedExceptionAction and the type returned by the action- Parameters:
action
- The action to run- Returns:
- The return from the action
- Throws:
Exception
- if thrown by the action
-
WebAppClassLoader
directly instead.