Interface WebAppClassLoader.Context

All Superinterfaces:
ClassVisibilityChecker
All Known Implementing Classes:
WebAppContext, WebAppContext, WebAppContext, WebAppContext
Enclosing class:
WebAppClassLoader

public static interface WebAppClassLoader.Context extends ClassVisibilityChecker
The Context in which the classloader operates.
  • Method Details

    • newResource

      Resource newResource(String urlOrPath) throws IOException
      Convert a URL or path to a Resource. The default implementation is a wrapper for ResourceFactory.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

      List<Resource> getExtraClasspath()
    • getHiddenClassMatcher

      ClassMatcher getHiddenClassMatcher()
    • isHiddenClass

      default boolean isHiddenClass(Class<?> clazz)
      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 interface ClassVisibilityChecker
      Parameters:
      clazz - The fully qualified name of the class.
      Returns:
      True if the class is a server class.
    • isHiddenResource

      default boolean isHiddenResource(String name, URL url)
    • getHiddenClasses

      @ManagedAttribute(value="classes and packages hidden by the context classloader", readonly=true) default String[] getHiddenClasses()
    • getProtectedClassMatcher

      ClassMatcher getProtectedClassMatcher()
    • isProtectedClass

      default boolean isProtectedClass(Class<?> clazz)
      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 interface ClassVisibilityChecker
      Parameters:
      clazz - The fully qualified name of the class.
      Returns:
      True if the class is a system class.
    • isProtectedResource

      default boolean isProtectedResource(String name, URL url)
    • getProtectedClasses

      @ManagedAttribute(value="classes and packages protected by context classloader", readonly=true) default String[] getProtectedClasses()
    • getPermissions

      default PermissionCollection getPermissions()
      Returns:
      Returns the permissions.