Class AntWebAppContext.AntURLClassLoader

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable
    Enclosing class:
    AntWebAppContext

    public static class AntWebAppContext.AntURLClassLoader
    extends java.net.URLClassLoader
    AntURLClassLoader Adapt the AntClassLoader which is not a URLClassLoader - this is needed for jsp to be able to search the classpath.
    • Constructor Summary

      Constructors 
      Constructor Description
      AntURLClassLoader​(org.apache.tools.ant.AntClassLoader antLoader)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void addURL​(java.net.URL url)  
      void clearAssertionStatus()  
      void close()  
      protected java.lang.Package definePackage​(java.lang.String name, java.lang.String specTitle, java.lang.String specVersion, java.lang.String specVendor, java.lang.String implTitle, java.lang.String implVersion, java.lang.String implVendor, java.net.URL sealBase)  
      protected java.lang.Package definePackage​(java.lang.String name, java.util.jar.Manifest man, java.net.URL url)  
      protected java.lang.Class<?> findClass​(java.lang.String name)  
      protected java.lang.String findLibrary​(java.lang.String libname)  
      java.net.URL findResource​(java.lang.String name)  
      java.util.Enumeration<java.net.URL> findResources​(java.lang.String name)  
      protected java.lang.Object getClassLoadingLock​(java.lang.String className)  
      protected java.lang.Package getPackage​(java.lang.String name)  
      protected java.lang.Package[] getPackages()  
      protected java.security.PermissionCollection getPermissions​(java.security.CodeSource codesource)  
      java.net.URL getResource​(java.lang.String name)  
      java.io.InputStream getResourceAsStream​(java.lang.String name)  
      java.util.Enumeration<java.net.URL> getResources​(java.lang.String name)  
      java.net.URL[] getURLs()  
      java.lang.Class<?> loadClass​(java.lang.String name)  
      protected java.lang.Class<?> loadClass​(java.lang.String name, boolean resolve)  
      void setClassAssertionStatus​(java.lang.String className, boolean enabled)  
      void setDefaultAssertionStatus​(boolean enabled)  
      void setPackageAssertionStatus​(java.lang.String packageName, boolean enabled)  
      • Methods inherited from class java.net.URLClassLoader

        newInstance, newInstance
      • Methods inherited from class java.security.SecureClassLoader

        defineClass, defineClass
      • Methods inherited from class java.lang.ClassLoader

        defineClass, defineClass, defineClass, defineClass, findClass, findLoadedClass, findResource, findSystemClass, getDefinedPackage, getDefinedPackages, getName, getParent, getPlatformClassLoader, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, registerAsParallelCapable, resolveClass, resources, setSigners
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AntURLClassLoader

        public AntURLClassLoader​(org.apache.tools.ant.AntClassLoader antLoader)
    • Method Detail

      • getResourceAsStream

        public java.io.InputStream getResourceAsStream​(java.lang.String name)
        Overrides:
        getResourceAsStream in class java.net.URLClassLoader
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class java.net.URLClassLoader
        Throws:
        java.io.IOException
      • addURL

        protected void addURL​(java.net.URL url)
        Overrides:
        addURL in class java.net.URLClassLoader
      • getURLs

        public java.net.URL[] getURLs()
        Overrides:
        getURLs in class java.net.URLClassLoader
      • findClass

        protected java.lang.Class<?> findClass​(java.lang.String name)
                                        throws java.lang.ClassNotFoundException
        Overrides:
        findClass in class java.net.URLClassLoader
        Throws:
        java.lang.ClassNotFoundException
      • definePackage

        protected java.lang.Package definePackage​(java.lang.String name,
                                                  java.util.jar.Manifest man,
                                                  java.net.URL url)
                                           throws java.lang.IllegalArgumentException
        Overrides:
        definePackage in class java.net.URLClassLoader
        Throws:
        java.lang.IllegalArgumentException
      • findResource

        public java.net.URL findResource​(java.lang.String name)
        Overrides:
        findResource in class java.net.URLClassLoader
      • findResources

        public java.util.Enumeration<java.net.URL> findResources​(java.lang.String name)
                                                          throws java.io.IOException
        Overrides:
        findResources in class java.net.URLClassLoader
        Throws:
        java.io.IOException
      • getPermissions

        protected java.security.PermissionCollection getPermissions​(java.security.CodeSource codesource)
        Overrides:
        getPermissions in class java.net.URLClassLoader
      • loadClass

        public java.lang.Class<?> loadClass​(java.lang.String name)
                                     throws java.lang.ClassNotFoundException
        Overrides:
        loadClass in class java.lang.ClassLoader
        Throws:
        java.lang.ClassNotFoundException
      • loadClass

        protected java.lang.Class<?> loadClass​(java.lang.String name,
                                               boolean resolve)
                                        throws java.lang.ClassNotFoundException
        Overrides:
        loadClass in class java.lang.ClassLoader
        Throws:
        java.lang.ClassNotFoundException
      • getClassLoadingLock

        protected java.lang.Object getClassLoadingLock​(java.lang.String className)
        Overrides:
        getClassLoadingLock in class java.lang.ClassLoader
      • getResource

        public java.net.URL getResource​(java.lang.String name)
        Overrides:
        getResource in class java.lang.ClassLoader
      • getResources

        public java.util.Enumeration<java.net.URL> getResources​(java.lang.String name)
                                                         throws java.io.IOException
        Overrides:
        getResources in class java.lang.ClassLoader
        Throws:
        java.io.IOException
      • definePackage

        protected java.lang.Package definePackage​(java.lang.String name,
                                                  java.lang.String specTitle,
                                                  java.lang.String specVersion,
                                                  java.lang.String specVendor,
                                                  java.lang.String implTitle,
                                                  java.lang.String implVersion,
                                                  java.lang.String implVendor,
                                                  java.net.URL sealBase)
                                           throws java.lang.IllegalArgumentException
        Overrides:
        definePackage in class java.lang.ClassLoader
        Throws:
        java.lang.IllegalArgumentException
      • getPackage

        protected java.lang.Package getPackage​(java.lang.String name)
        Overrides:
        getPackage in class java.lang.ClassLoader
      • getPackages

        protected java.lang.Package[] getPackages()
        Overrides:
        getPackages in class java.lang.ClassLoader
      • findLibrary

        protected java.lang.String findLibrary​(java.lang.String libname)
        Overrides:
        findLibrary in class java.lang.ClassLoader
      • setDefaultAssertionStatus

        public void setDefaultAssertionStatus​(boolean enabled)
        Overrides:
        setDefaultAssertionStatus in class java.lang.ClassLoader
      • setPackageAssertionStatus

        public void setPackageAssertionStatus​(java.lang.String packageName,
                                              boolean enabled)
        Overrides:
        setPackageAssertionStatus in class java.lang.ClassLoader
      • setClassAssertionStatus

        public void setClassAssertionStatus​(java.lang.String className,
                                            boolean enabled)
        Overrides:
        setClassAssertionStatus in class java.lang.ClassLoader
      • clearAssertionStatus

        public void clearAssertionStatus()
        Overrides:
        clearAssertionStatus in class java.lang.ClassLoader