Interface WebAppClassLoader.Context
- All Superinterfaces:
ClassVisibilityChecker
- All Known Implementing Classes:
WebAppContext
,WebAppContext
,WebAppContext
,WebAppContext
- Enclosing class:
WebAppClassLoader
The Context in which the classloader operates.
-
Method Summary
Modifier and TypeMethodDescriptiondefault String[]
default PermissionCollection
default String[]
default boolean
isHiddenClass
(Class<?> clazz) Is the class a Hidden (Server) Class.default boolean
isHiddenResource
(String name, URL url) boolean
default boolean
isProtectedClass
(Class<?> clazz) Is the class a Protected (System) Class.default boolean
isProtectedResource
(String name, URL url) newResource
(String urlOrPath) Convert a URL or path to a Resource.Methods inherited from interface org.eclipse.jetty.util.ClassVisibilityChecker
isServerClass, isSystemClass
-
Method Details
-
newResource
Convert a URL or path to a Resource. The default implementation is a wrapper forResourceFactory.newResource(String)
.- Parameters:
urlOrPath
- The URL or path to convert- Returns:
- The Resource for the URL/path
- Throws:
IOException
- The Resource could not be created.
-
isParentLoaderPriority
boolean isParentLoaderPriority()- Returns:
- True if the classloader should delegate first to the parent classloader (standard java behaviour) or false if the classloader should first try to load from WEB-INF/lib or WEB-INF/classes (servlet spec recommendation).
-
getExtraClasspath
-
getHiddenClassMatcher
ClassMatcher getHiddenClassMatcher() -
isHiddenClass
Description copied from interface:ClassVisibilityChecker
Is the class a Hidden (Server) Class. A Server class is a class that is part of the implementation of the server and is NOT visible to a web application. The web application may provide its own implementation of the class, to be loaded from WEB-INF/lib or WEB-INF/classes- Specified by:
isHiddenClass
in interfaceClassVisibilityChecker
- Parameters:
clazz
- The fully qualified name of the class.- Returns:
- True if the class is a server class.
-
isHiddenResource
-
getHiddenClasses
@ManagedAttribute(value="classes and packages hidden by the context classloader", readonly=true) default String[] getHiddenClasses() -
getProtectedClassMatcher
ClassMatcher getProtectedClassMatcher() -
isProtectedClass
Description copied from interface:ClassVisibilityChecker
Is the class a Protected (System) Class. A System class is a class that is visible to a web application, but that cannot be overridden by the contents of WEB-INF/lib or WEB-INF/classes- Specified by:
isProtectedClass
in interfaceClassVisibilityChecker
- Parameters:
clazz
- The fully qualified name of the class.- Returns:
- True if the class is a system class.
-
isProtectedResource
-
getProtectedClasses
@ManagedAttribute(value="classes and packages protected by context classloader", readonly=true) default String[] getProtectedClasses() -
getPermissions
- Returns:
- Returns the permissions.
-