Class WebAppClassLoader

    • Constructor Detail

      • WebAppClassLoader

        public WebAppClassLoader​(WebAppClassLoader.Context context)
                          throws IOException
        Deprecated.
        Constructor.
        Parameters:
        context - the context for this classloader
        Throws:
        IOException - if unable to initialize from context
      • WebAppClassLoader

        public WebAppClassLoader​(ClassLoader parent,
                                 WebAppClassLoader.Context context)
                          throws IOException
        Deprecated.
        Constructor.
        Parameters:
        parent - the parent classloader
        context - the context for this classloader
        Throws:
        IOException - if unable to initialize classloader
    • Method Detail

      • runWithServerClassAccess

        public static <T> T runWithServerClassAccess​(PrivilegedExceptionAction<T> action)
                                              throws Exception
        Deprecated.
        Run an action with access to ServerClasses

        Run the passed PrivilegedExceptionAction with the classloader configured so as to allow server classes to be visible

        Type Parameters:
        T - 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
      • getName

        public String getName()
        Deprecated.
        Overrides:
        getName in class ClassLoader
        Returns:
        the name of the classloader
      • setName

        public void setName​(String name)
        Deprecated.
        Parameters:
        name - the name of the classloader
      • addClassPath

        public void addClassPath​(Resource resource)
                          throws IOException
        Deprecated.
        Parameters:
        resource - Comma or semicolon separated path of filenames or URLs pointing to directories or jar files. Directories should end with '/'.
        Throws:
        IOException - if unable to add classpath from resource
      • addClassPath

        public void addClassPath​(String classPath)
                          throws IOException
        Deprecated.
        Parameters:
        classPath - Comma or semicolon separated path of filenames or URLs pointing to directories or jar files. Directories should end with '/'.
        Throws:
        IOException - if unable to add classpath
      • addJars

        public void addJars​(Resource lib)
        Deprecated.
        Add elements to the class path for the context from the jar and zip files found in the specified resource.
        Parameters:
        lib - the resource that contains the jar and/or zip files.
      • getResource

        public URL getResource​(String name)
        Deprecated.
        Get a resource from the classloader NOTE: this method provides a convenience of hacking off a leading / should one be present. This is non-standard and it is recommended to not rely on this behavior
        Overrides:
        getResource in class ClassLoader
      • removeTransformer

        public boolean removeTransformer​(ClassFileTransformer transformer)
        Deprecated.
      • isSystemClass

        public boolean isSystemClass​(Class<?> clazz)
        Deprecated.
        Description copied from interface: ClassVisibilityChecker
        Is the class a System Class. A System class is a class that is visible to a webapplication, but that cannot be overridden by the contents of WEB-INF/lib or WEB-INF/classes
        Specified by:
        isSystemClass in interface ClassVisibilityChecker
        Parameters:
        clazz - The fully qualified name of the class.
        Returns:
        True if the class is a system class.
      • isServerClass

        public boolean isServerClass​(Class<?> clazz)
        Deprecated.
        Description copied from interface: ClassVisibilityChecker
        Is the class a Server Class. A Server class is a class that is part of the implementation of the server and is NIT visible to a webapplication. The web application may provide it's own implementation of the class, to be loaded from WEB-INF/lib or WEB-INF/classes
        Specified by:
        isServerClass in interface ClassVisibilityChecker
        Parameters:
        clazz - The fully qualified name of the class.
        Returns:
        True if the class is a server class.